Skip to content

Commit

Permalink
include minified and prototype files in package
Browse files Browse the repository at this point in the history
fixes #2804
fixes #2635
  • Loading branch information
koenpunt committed Apr 22, 2017
1 parent 8913ff9 commit e07c592
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@
},
"files": [
"chosen.jquery.js",
"chosen.jquery.min.js",
"chosen.proto.js",
"chosen.proto.min.js",
"chosen.css",
"chosen.min.css",
"chosen-sprite@2x.png",
"chosen-sprite.png"
]
Expand Down
2 changes: 1 addition & 1 deletion publish-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GITHUB_URL=https://pfiller:${GH_TOKEN}@github.com/harvesthq/chosen-package.git

git clone $GITHUB_URL
rm -rf chosen-package/*
cp README.md public/*.json public/*.png public/chosen.jquery.js public/chosen.css chosen-package/
cp README.md public/*.json public/*.png public/*.js public/*.css chosen-package/
cp package-travis.yml chosen-package/.travis.yml
cd chosen-package

Expand Down
5 changes: 3 additions & 2 deletions tasks/package.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = (grunt) ->

grunt.registerTask 'package-npm', 'Generate npm manifest', () ->
pkg = grunt.config.get('pkg')
extra = pkg._extra

json =
name: "#{pkg.name}-js"
Expand All @@ -35,8 +36,8 @@ module.exports = (grunt) ->
license: pkg.license
contributors: pkg.contributors
dependencies: pkg.dependencies
files: pkg._extra.files
main: pkg._extra.files[0]
files: extra.files
main: extra.files[0]
repository: pkg.repository

grunt.file.write('public/package.json', JSON.stringify(json, null, 2) + "\n")
Expand Down

0 comments on commit e07c592

Please sign in to comment.