Skip to content

Commit

Permalink
add stylify and npm task
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Sep 23, 2015
1 parent 0e3ae61 commit 386a5e2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion config/browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var _ = require('lodash');
var babelify = require('babelify');
var browserify = require('browserify');
var gutil = require('gulp-util');
var stylify = require('stylify');
var watchify = require('watchify');


Expand All @@ -15,7 +16,7 @@ module.exports = function(entry) {
'./node_modules/parchment/dist/parchment.js'
],
standalone: 'Quill',
transform: [babelify]
transform: [babelify, stylify]
});
var b = watchify(browserify(entry, opts));
b.on('log', gutil.log.bind(gutil, '[Browserify] '));
Expand Down
7 changes: 7 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ gulp.task('default', ['build']);

gulp.task('examples', ['examples:styles', 'examples:html', 'examples:scripts']);
gulp.task('build', ['source', 'theme', 'examples']);
gulp.task('npm', function(callback) {
runsequence(
'clean',
['source', 'theme'],
'dist'
, callback);
});
gulp.task('release', function(callback) {
runsequence(
'clean',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"url": "https://github.com/quilljs/quill/issues"
},
"scripts": {
"prepublish": "gulp dist",
"prepublish": "gulp npm",
"start": "gulp dev",
"test": "gulp test"
},
Expand Down
5 changes: 2 additions & 3 deletions src/themes/base/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// TODO baseStyles = require('./base.styl');

import baseStyles from './base.styl';
import * as platform from '../../lib/platform';


Expand All @@ -8,7 +7,7 @@ class BaseTheme {
this.quill = quill;
this.quill.container.classList.add('ql-container');
if (styles) {
this.addStyles('');
this.addStyles(baseStyles);
}
if (platform.isIE(10)) {
this.quill.root.classList.add('ql-ie-10');
Expand Down

0 comments on commit 386a5e2

Please sign in to comment.