mirror of
https://github.com/wassname/scheduler.git
synced 2026-06-27 16:46:44 +08:00
@@ -11,7 +11,7 @@
|
|||||||
"laxbreak": true,
|
"laxbreak": true,
|
||||||
"laxcomma": true,
|
"laxcomma": true,
|
||||||
"newcap": true,
|
"newcap": true,
|
||||||
"node": false,
|
"node": true,
|
||||||
"shadow": false,
|
"shadow": false,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"undef": true,
|
"undef": true,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
.*
|
.*
|
||||||
*.log
|
*.log
|
||||||
bower.json
|
bower.json
|
||||||
|
gulp
|
||||||
gulpfile.js
|
gulpfile.js
|
||||||
index.html
|
index.html
|
||||||
test.js
|
test.js
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
"ignore": [
|
"ignore": [
|
||||||
"**/.*",
|
"**/.*",
|
||||||
"bower_components",
|
"bower_components",
|
||||||
|
"gulp"
|
||||||
"index.html",
|
"index.html",
|
||||||
"node_modules",
|
"node_modules",
|
||||||
"test",
|
"test",
|
||||||
|
|||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
.scheduler {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.scheduler .something-inside-schedler {
|
||||||
|
background: #efefef;
|
||||||
|
}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
.scheduler{color:#000;}.scheduler .something-inside-schedler{background:#efefef}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
!function(){"use strict"}();
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
var config = {};
|
||||||
|
|
||||||
|
config.paths = { src: {}, dist: {} };
|
||||||
|
|
||||||
|
config.paths.src.base = './src/';
|
||||||
|
config.paths.src.css = config.paths.src.base + 'css/';
|
||||||
|
config.paths.src.js = config.paths.src.base + 'js/';
|
||||||
|
config.paths.src.stylus = config.paths.src.base + 'stylus/';
|
||||||
|
|
||||||
|
config.paths.dist.base = './dist/';
|
||||||
|
config.paths.dist.css = config.paths.dist.base + 'css/';
|
||||||
|
config.paths.dist.js = config.paths.dist.base + 'js/';
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
+73
-7
@@ -1,13 +1,79 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var gulp = require( 'gulp' );
|
var gulp = require( 'gulp' );
|
||||||
var jshint = require( 'gulp-jshint' );
|
var jshint = require( 'gulp-jshint' );
|
||||||
|
var rename = require( 'gulp-rename' );
|
||||||
|
var runSequence = require( 'run-sequence' );
|
||||||
|
var stylus = require( 'gulp-stylus' );
|
||||||
|
var uglify = require( 'gulp-uglify' );
|
||||||
|
|
||||||
|
// not sure if we'll use nib, but probably should add it
|
||||||
|
var nib = require( 'nib' );
|
||||||
|
|
||||||
gulp.task('jshint', function() {
|
var gulpConfig = require( './gulp/config' );
|
||||||
gulp.src( ['./scheduler.js', './test.js'] )
|
|
||||||
.pipe( jshint('./.jshintrc') )
|
var paths = gulpConfig.paths;
|
||||||
.pipe( jshint.reporter( 'jshint-stylish' ) );
|
|
||||||
|
var stylusOptions = {
|
||||||
|
use: nib()
|
||||||
|
, compress: false
|
||||||
|
};
|
||||||
|
|
||||||
|
gulp.task( 'default', function( cb ) {
|
||||||
|
runSequence( 'jshint', 'release', cb );
|
||||||
});
|
});
|
||||||
|
|
||||||
// will add tasks for min and other stuff
|
gulp.task( 'release', [ 'stylus', 'stylus:compress', 'uglify', 'copySrcFiles' ] );
|
||||||
|
|
||||||
|
gulp.task( 'watch', function() {
|
||||||
|
gulp.watch( paths.src.stylus + '**/*', [ 'stylus' ] );
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task( 'jshint', function() {
|
||||||
|
var files = [
|
||||||
|
'./gulpfile.js'
|
||||||
|
, './test.js'
|
||||||
|
, paths.src.js + 'scheduler.js'
|
||||||
|
];
|
||||||
|
|
||||||
|
return gulp.src( files )
|
||||||
|
.pipe( jshint( './.jshintrc' ) )
|
||||||
|
.pipe( jshint.reporter( 'jshint-stylish' ) )
|
||||||
|
.pipe( jshint.reporter( 'fail' ) );
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task( 'uglify', function() {
|
||||||
|
return gulp.src( [ paths.src.js + 'scheduler.js' ] )
|
||||||
|
.pipe( uglify() )
|
||||||
|
.pipe( rename({
|
||||||
|
extname: '.min.js'
|
||||||
|
}))
|
||||||
|
.pipe( gulp.dest( paths.dist.js ) );
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task( 'stylus', function() {
|
||||||
|
stylusOptions.compress = false;
|
||||||
|
|
||||||
|
return gulp.src( [ paths.src.stylus + 'scheduler.styl' ] )
|
||||||
|
.pipe( stylus( stylusOptions ) )
|
||||||
|
.pipe( gulp.dest( paths.src.css ) );
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task( 'stylus:compress', function() {
|
||||||
|
stylusOptions.compress = true;
|
||||||
|
|
||||||
|
return gulp.src( [ paths.src.stylus + 'scheduler.styl' ] )
|
||||||
|
.pipe( stylus( stylusOptions ) )
|
||||||
|
.pipe( rename({
|
||||||
|
extname: '.min.css'
|
||||||
|
}))
|
||||||
|
.pipe( gulp.dest( paths.dist.css ) );
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task( 'copySrcFiles', function() {
|
||||||
|
gulp.src( [ paths.src.js + '**/*' ] )
|
||||||
|
.pipe( gulp.dest( paths.dist.js ) );
|
||||||
|
|
||||||
|
gulp.src( [ paths.src.css + '**/*' ] )
|
||||||
|
.pipe( gulp.dest( paths.dist.css ) );
|
||||||
|
});
|
||||||
|
|||||||
+6
-1
@@ -25,6 +25,11 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gulp": "^3.8.10",
|
"gulp": "^3.8.10",
|
||||||
"gulp-jshint": "^1.9.0",
|
"gulp-jshint": "^1.9.0",
|
||||||
"jshint-stylish": "^1.0.0"
|
"gulp-rename": "^1.2.0",
|
||||||
|
"gulp-stylus": "^1.3.4",
|
||||||
|
"gulp-uglify": "^1.0.2",
|
||||||
|
"jshint-stylish": "^1.0.0",
|
||||||
|
"nib": "^1.0.4",
|
||||||
|
"run-sequence": "^1.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
.scheduler {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.scheduler .something-inside-schedler {
|
||||||
|
background: #efefef;
|
||||||
|
}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
.scheduler{color:#000;}.scheduler .something-inside-schedler{background:#efefef}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// we'll get there don't worry
|
||||||
|
})();
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
.scheduler {
|
||||||
|
// following is just testing
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
.something-inside-schedler {
|
||||||
|
background: #efefef;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user