Skip to content

Commit

Permalink
set up npm prepublish
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed May 15, 2014
1 parent 336a38e commit ff4797c
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build
node_modules
coverage
lib
tests/webdriver/fuzzer_output
tests/webdriver/logs
*.log
TODO
11 changes: 11 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.git
.travis.yml
_*
bower.json
npm-debug.log
build
coverage
demo
grunt
src
test
4 changes: 2 additions & 2 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = (grunt) ->

grunt.registerTask('default', ['build'])

grunt.registerTask('build', ['clean', 'copy', 'browserify:quill', 'browserify:tandem', 'uglify', 'concat', 'coffee', 'jade', 'stylus'])
grunt.registerTask('build', ['clean', 'browserify:quill', 'browserify:tandem', 'uglify', 'concat', 'coffee', 'jade', 'stylus'])

# TODO is there a better way to do this...
grunt.registerTask('dev', 'All the tasks for Quill development', ->
Expand All @@ -33,4 +33,4 @@ module.exports = (grunt) ->
grunt.registerTask('test:unit', ['karma:test'])
grunt.registerTask('test:unit:remote', ['karma:remote-mac', 'karma:remote-windows', 'karma:remote-linux', 'karma:remote-mobile', 'karma:remote-legacy'])

grunt.registerTask('test:coverage', ['coffee:coverage', 'shell:instrument', 'browserify:quill', 'karma:coverage', 'clean:coverage', 'browserify:quill'])
grunt.registerTask('test:coverage', ['coffee:src', 'shell:instrument', 'browserify:quill', 'karma:coverage', 'clean:coverage', 'browserify:quill'])
20 changes: 8 additions & 12 deletions grunt/build.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = (grunt) ->
bundleOptions:
standalone: 'Quill'
files: [
{ 'build/quill.js': ['index.coffee'] }
{ 'build/quill.js': ['src/quill.coffee'] }
{ 'build/quill.exposed.js': ['test/quill.coffee'] }
]
'tandem':
Expand All @@ -29,7 +29,7 @@ module.exports = (grunt) ->
standalone: 'Quill'
keepAlive: true
watch: true
files: [{ 'build/quill.js': ['index.coffee'] }]
files: [{ 'build/quill.js': ['src/quill.coffee'] }]
'quill-exposed-watchify':
options:
bundleOptions:
Expand All @@ -50,10 +50,13 @@ module.exports = (grunt) ->
dest: 'build/'
src: ['demo/scripts/*.coffee', 'test/**/*.coffee']
ext: '.js'
coverage:
src:
options:
bare: true
cwd: 'src/'
dest: 'lib/'
expand: true
dest: 'build/'
src: ['src/**/*.coffee']
src: ['**/*.coffee']
ext: '.js'
)

Expand All @@ -70,13 +73,6 @@ module.exports = (grunt) ->
'build/quill.min.js': ['build/quill.min.js']
)

grunt.config('copy'
build:
expand: true
dest: 'build/'
src: ['lib/*.js', 'demo/images/*.png']
)

grunt.config('jade',
all:
options:
Expand Down
2 changes: 1 addition & 1 deletion grunt/test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ module.exports = (grunt) ->
grunt.config('shell',
options:
stdout: true
instrument: { command: './node_modules/.bin/istanbul instrument build/src -o src/' }
instrument: { command: './node_modules/.bin/istanbul instrument lib/ -o src/' }
)
1 change: 0 additions & 1 deletion index.coffee

This file was deleted.

1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./lib/quill');
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"Byron Milligan <byronner@gmail.com>",
"Keegan Poppen <keegan.poppen@gmail.com>"
],
"main": "index.js",
"dependencies": {
"eventemitter2": "~0.4.13",
"lodash": "~2.4.1",
Expand All @@ -23,7 +24,6 @@
"grunt-contrib-coffee": "~0.10.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-connect": "~0.7.1",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-jade": "~0.11.0",
"grunt-contrib-stylus": "~0.13.2",
"grunt-contrib-uglify": "~0.4.0",
Expand Down Expand Up @@ -59,6 +59,7 @@
"url": "https://github.com/quilljs/quill/issues"
},
"scripts": {
"prepublish": "grunt coffee:src",
"test": "grunt test"
},
"keywords": ["editor", "rich text", "wysiwyg"]
Expand Down

0 comments on commit ff4797c

Please sign in to comment.