Skip to content

Commit

Permalink
Merge 6975e83 into 4799e7d
Browse files Browse the repository at this point in the history
  • Loading branch information
lqez committed Nov 29, 2018
2 parents 4799e7d + 6975e83 commit 8a22453
Show file tree
Hide file tree
Showing 98 changed files with 1,219 additions and 1,218 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Expand Up @@ -8,7 +8,8 @@
"space-before-function-paren": ["error", "never"],
"no-useless-escape": 0,
"no-unused-expressions": 0,
"chai-friendly/no-unused-expressions": 2
"chai-friendly/no-unused-expressions": 2,
"comma-dangle": ["error", "always-multiline"]
},
"env": {
"es6": true,
Expand Down
112 changes: 56 additions & 56 deletions Gruntfile.js
Expand Up @@ -32,26 +32,26 @@ module.exports = function(grunt) {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '10.0',
platform: 'windows 8'
platform: 'windows 8',
},
'SL_IE11': {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '11.0',
platform: 'windows 8.1'
platform: 'windows 8.1',
},
'SL_CHROME': {
base: 'SauceLabs',
browserName: 'chrome',
version: 'latest',
platform: 'windows 8'
platform: 'windows 8',
},
'SL_FIREFOX': {
base: 'SauceLabs',
browserName: 'firefox',
version: 'latest',
platform: 'windows 8'
}
platform: 'windows 8',
},
};

grunt.initConfig({
Expand All @@ -62,16 +62,16 @@ module.exports = function(grunt) {
build: {
bs3: {
input: './src/js/bs3/settings',
output: './dist/summernote.js'
output: './dist/summernote.js',
},
bs4: {
input: './src/js/bs4/settings',
output: './dist/summernote-bs4.js'
output: './dist/summernote-bs4.js',
},
lite: {
input: './src/js/lite/settings',
output: './dist/summernote-lite.js'
}
output: './dist/summernote-lite.js',
},
},

// for javascript convention.
Expand All @@ -84,14 +84,14 @@ module.exports = function(grunt) {
'test/**/*.js',
'!coverage/**/*.js',
'!test/coverage/**/*.js',
'build/*.js'
]
'build/*.js',
],
},

// uglify: minify javascript
uglify: {
options: {
banner: '/*! Summernote v<%=pkg.version%> | (c) 2013- Alan Hong and other contributors | MIT license */\n'
banner: '/*! Summernote v<%=pkg.version%> | (c) 2013- Alan Hong and other contributors | MIT license */\n',
},
all: {
files: [
Expand All @@ -103,17 +103,17 @@ module.exports = function(grunt) {
cwd: 'dist/lang',
src: '**/*.js',
dest: 'dist/lang',
ext: '.min.js'
ext: '.min.js',
},
{
expand: true,
cwd: 'dist/plugin',
src: '**/*.js',
dest: 'dist/plugin',
ext: '.min.js'
}
]
}
ext: '.min.js',
},
],
},
},

// recess: minify stylesheets
Expand All @@ -124,18 +124,18 @@ module.exports = function(grunt) {
{
'dist/summernote.css': ['src/less/summernote.less'],
'dist/summernote-bs4.css': ['src/less/summernote-bs4.less'],
'dist/summernote-lite.css': ['src/less/summernote-lite.less']
'dist/summernote-lite.css': ['src/less/summernote-lite.less'],

},
{
expand: true,
cwd: 'dist/plugin',
src: '**/*.css',
dest: 'dist/plugin',
ext: '.min.css'
}
]
}
ext: '.min.css',
},
],
},
},

// compress: summernote-{{version}}-dist.zip
Expand All @@ -147,29 +147,29 @@ module.exports = function(grunt) {
'{{version}}',
grunt.config('pkg.version')
);
}
},
},
files: [{
expand: true,
src: [
'dist/*.js',
'dist/*.css',
'dist/font/*'
]
'dist/font/*',
],
}, {
src: ['plugin/**/*.js', 'plugin/**/*.css', 'lang/**/*.js'],
dest: 'dist/'
}]
}
dest: 'dist/',
}],
},
},

// connect configuration.
connect: {
all: {
options: {
port: 3000
}
}
port: 3000,
},
},
},

// watch source code change
Expand All @@ -178,39 +178,39 @@ module.exports = function(grunt) {
files: ['src/less/*.less'],
tasks: ['recess'],
options: {
livereload: true
}
livereload: true,
},
},
script: {
files: ['src/js/**/*.js', 'test/unit/**/*.js'],
tasks: ['lint', 'build', 'karma:all'],
options: {
livereload: true
}
}
livereload: true,
},
},
},

karma: {
options: {
configFile: './karma.conf.js'
configFile: './karma.conf.js',
},
watch: {
background: false,
singleRun: false
singleRun: false,
},
all: {
// Chrome, ChromeCanary, Firefox, Opera, Safari, PhantomJS, IE
singleRun: true,
browsers: ['PhantomJS']
browsers: ['PhantomJS'],
},
dist: {
singleRun: true,
browsers: ['PhantomJS']
browsers: ['PhantomJS'],
},
travis: {
singleRun: true,
browsers: ['PhantomJS'],
reporters: ['dots', 'coverage']
reporters: ['dots', 'coverage'],
},
saucelabs: {
reporters: ['saucelabs'],
Expand All @@ -219,33 +219,33 @@ module.exports = function(grunt) {
startConnect: false,
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
build: process.env.TRAVIS_BUILD_NUMBER,
tags: [process.env.TRAVIS_BRANCH, process.env.TRAVIS_PULL_REQUEST]
tags: [process.env.TRAVIS_BRANCH, process.env.TRAVIS_PULL_REQUEST],
},
captureTimeout: 120000,
customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers),
singleRun: true
}
singleRun: true,
},
},

coveralls: {
options: {
force: false
force: false,
},
travis: {
src: 'coverage/**/lcov.info'
}
src: 'coverage/**/lcov.info',
},
},
clean: {
dist: ['dist/**/*']
dist: ['dist/**/*'],
},
copy: {
dist: {
files: [
{ src: 'lang/*', dest: 'dist/' },
{ expand: true, cwd: 'src/icons/dist/font/', src: ['**', '!*.html'], dest: 'dist/font/' }
]
}
{ expand: true, cwd: 'src/icons/dist/font/', src: ['**', '!*.html'], dest: 'dist/font/' },
],
},
},
webfont: {
icons: {
Expand All @@ -256,10 +256,10 @@ module.exports = function(grunt) {
font: 'summernote',
relativeFontPath: './font/',
stylesheet: 'less',
template: 'src/icons/templates/summernote.css'
}
}
}
template: 'src/icons/templates/summernote.css',
},
},
},
});

// load all tasks from the grunt plugins used in this file
Expand Down Expand Up @@ -287,7 +287,7 @@ module.exports = function(grunt) {
grunt.registerTask('dist', [
'clean:dist',
'build', 'webfont', 'lint', 'karma:dist',
'copy:dist', 'uglify', 'recess', 'compress'
'copy:dist', 'uglify', 'recess', 'compress',
]);

// default: server
Expand Down

0 comments on commit 8a22453

Please sign in to comment.