Added 'load-grunt-config' plugin
The plugin replaces the custom 'loadConfig()' function with a more robust and extensible solution. It handles 'grunt.initConfig()' and 'load-grunt-tasks'. Changes: - Moved Grunt task configurations into a 'config/' sub-directory to allow room for custom plugins, modules, and tasks to be defined without being included by the config-loader; - Updated '.eslintrc' to better lint module-based JS; - Updated EditorConfig recommendations;
This commit is contained in:
@@ -10,9 +10,6 @@ end_of_line = lf
|
|||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
[*.json,.bowerrc]
|
[{*.md,.*rc,.*.json,*.yml,.editorconfig,.env,.env.*,.git*,.htaccess,.jshintignore,bower.json,composer.json,package.json}]
|
||||||
insert_final_newline = false
|
|
||||||
|
|
||||||
[{.htaccess,.bowerrc,bower.json,package.json,component.json}]
|
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|||||||
84
.eslintrc
84
.eslintrc
@@ -1,42 +1,46 @@
|
|||||||
{
|
{
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true,
|
"browser": true,
|
||||||
"node": true,
|
"node": true,
|
||||||
"es6": true
|
"es6": true
|
||||||
},
|
},
|
||||||
"ecmaFeatures": {
|
"parserOptions": {
|
||||||
"arrowFunctions": true,
|
"ecmaVersion": 6,
|
||||||
"binaryLiterals": true,
|
"sourceType": "module"
|
||||||
"blockBindings": true,
|
},
|
||||||
"classes": true,
|
"ecmaFeatures": {
|
||||||
"defaultParams": true,
|
"arrowFunctions": true,
|
||||||
"destructuring": true,
|
"binaryLiterals": true,
|
||||||
"forOf": true,
|
"blockBindings": true,
|
||||||
"generators": true,
|
"classes": true,
|
||||||
"modules": true,
|
"defaultParams": true,
|
||||||
"objectLiteralComputedProperties": true,
|
"destructuring": true,
|
||||||
"objectLiteralDuplicateProperties": true,
|
"forOf": true,
|
||||||
"objectLiteralShorthandMethods": true,
|
"generators": true,
|
||||||
"objectLiteralShorthandProperties": true,
|
"modules": true,
|
||||||
"octalLiterals": true,
|
"objectLiteralComputedProperties": true,
|
||||||
"regexUFlag": true,
|
"objectLiteralDuplicateProperties": true,
|
||||||
"regexYFlag": true,
|
"objectLiteralShorthandMethods": true,
|
||||||
"spread": true,
|
"objectLiteralShorthandProperties": true,
|
||||||
"superInFunctions": false,
|
"octalLiterals": true,
|
||||||
"templateStrings": true,
|
"regexUFlag": true,
|
||||||
"unicodeCodePointEscapes": true,
|
"regexYFlag": true,
|
||||||
"globalReturn": true,
|
"spread": true,
|
||||||
"jsx": true
|
"superInFunctions": false,
|
||||||
},
|
"templateStrings": true,
|
||||||
"rules": {
|
"unicodeCodePointEscapes": true,
|
||||||
"eqeqeq": 2,
|
"globalReturn": true,
|
||||||
"strict": 0,
|
"jsx": true
|
||||||
"no-empty": 1,
|
},
|
||||||
"no-alert": 2,
|
"rules": {
|
||||||
"no-eval": 2,
|
"eqeqeq": 2,
|
||||||
"quotes": [1, "single", "avoid-escape"],
|
"strict": 0,
|
||||||
"no-trailing-spaces": [2, { "skipBlankLines": true }],
|
"no-empty": 1,
|
||||||
"eol-last": 0,
|
"no-alert": 2,
|
||||||
"yoda": [2, "never", { "exceptRange": true }]
|
"no-eval": 2,
|
||||||
}
|
"quotes": [1, "single", "avoid-escape"],
|
||||||
|
"no-trailing-spaces": [2, { "skipBlankLines": true }],
|
||||||
|
"eol-last": 0,
|
||||||
|
"yoda": [2, "never", { "exceptRange": true }]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
.gitignore
vendored
16
.gitignore
vendored
@@ -1,3 +1,15 @@
|
|||||||
.DS_Store
|
# General
|
||||||
|
# -----------------
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
error_log
|
||||||
|
|
||||||
|
# Package Managers
|
||||||
|
# -----------------
|
||||||
|
|
||||||
|
composer.phar
|
||||||
|
vendor/
|
||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log
|
bower_components/
|
||||||
|
|||||||
80
Gruntfile.js
80
Gruntfile.js
@@ -1,55 +1,35 @@
|
|||||||
module.exports = function(grunt) {
|
/**
|
||||||
|
* Grunt Task Wrangler
|
||||||
|
*
|
||||||
|
* @copyright Copyright © 2016 Locomotive
|
||||||
|
* @license Licensed under the MIT license.
|
||||||
|
*/
|
||||||
|
|
||||||
function loadConfig(path) {
|
'use strict';
|
||||||
var glob = require('glob');
|
|
||||||
var object = {};
|
|
||||||
var key;
|
|
||||||
|
|
||||||
glob.sync('*', {cwd: path}).forEach(function(option) {
|
module.exports = function (grunt)
|
||||||
key = option.replace(/\.js$/,'');
|
{
|
||||||
object[key] = require(path + option);
|
var path = require('path');
|
||||||
});
|
|
||||||
|
|
||||||
return object;
|
require('load-grunt-config')(grunt, {
|
||||||
}
|
configPath: path.join(process.cwd(), 'build/grunt/config'),
|
||||||
|
data: {
|
||||||
var config = {
|
paths: {
|
||||||
pkg: grunt.file.readJSON('package.json')
|
grunt: 'build/grunt',
|
||||||
}
|
js: {
|
||||||
|
src: 'assets/scripts',
|
||||||
grunt.loadTasks('build/grunt');
|
dist: 'www/assets/scripts'
|
||||||
grunt.util._.extend(config, loadConfig('./build/grunt/'));
|
},
|
||||||
grunt.initConfig(config);
|
css: {
|
||||||
|
src: 'assets/styles',
|
||||||
// Load tasks
|
dist: 'www/assets/styles'
|
||||||
require('load-grunt-tasks')(grunt);
|
},
|
||||||
|
img: {
|
||||||
// Register tasks
|
src: 'assets/images',
|
||||||
grunt.registerTask('default', ['build']);
|
dist: 'www/assets/images'
|
||||||
grunt.registerTask('sync', ['browserSync', 'browserify:dev', 'watch', 'notify:watch']);
|
}
|
||||||
grunt.registerTask('build', [
|
}
|
||||||
// CSS
|
}
|
||||||
'sass',
|
});
|
||||||
'postcss',
|
|
||||||
'cssmin',
|
|
||||||
// JS
|
|
||||||
'browserify:prod',
|
|
||||||
'uglify',
|
|
||||||
// SVG
|
|
||||||
'svgstore',
|
|
||||||
'svgmin',
|
|
||||||
// Notify
|
|
||||||
'notify:build'
|
|
||||||
]);
|
|
||||||
grunt.registerTask('w', ['browserify:dev', 'watch', 'notify:watch']);
|
|
||||||
grunt.registerTask('c', [
|
|
||||||
'csscomb'
|
|
||||||
]);
|
|
||||||
grunt.registerTask('j', [
|
|
||||||
'eslint'
|
|
||||||
]);
|
|
||||||
grunt.registerTask('p', [
|
|
||||||
'phplint'
|
|
||||||
]);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
dev: {
|
|
||||||
bsFiles: {
|
|
||||||
src : [
|
|
||||||
'www/assets/styles/**/*.css'
|
|
||||||
,'www/assets/scripts/**/*.js'
|
|
||||||
,'www/assets/images/**/*.svg'
|
|
||||||
,'www/**/*.php'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
options: {
|
|
||||||
proxy: "localhost",
|
|
||||||
port: 3000,
|
|
||||||
watchTask: true,
|
|
||||||
notify: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
dev: {
|
|
||||||
options: {
|
|
||||||
transform: [['babelify', { presets: ['es2015'] }]],
|
|
||||||
watch : true, // use watchify for incremental builds!
|
|
||||||
browserifyOptions : {
|
|
||||||
debug : true // source mapping
|
|
||||||
}
|
|
||||||
},
|
|
||||||
files: {
|
|
||||||
'www/assets/scripts/app.js': [
|
|
||||||
'assets/scripts/**/*.js',
|
|
||||||
'!assets/scripts/vendors/*.js'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
prod: {
|
|
||||||
options: {
|
|
||||||
transform: [['babelify', { presets: ['es2015'] }]],
|
|
||||||
browserifyOptions: { debug: false },
|
|
||||||
exclude: ''
|
|
||||||
},
|
|
||||||
files: {
|
|
||||||
'www/assets/scripts/app.js': [
|
|
||||||
'assets/scripts/**/*.js',
|
|
||||||
'!assets/scripts/vendors/*.js'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
vendors: {
|
|
||||||
src: [
|
|
||||||
'assets/scripts/vendors/*.js'
|
|
||||||
],
|
|
||||||
dest: 'www/assets/scripts/vendors.js'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
41
build/grunt/config/aliases.json
Normal file
41
build/grunt/config/aliases.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"default": [
|
||||||
|
"build"
|
||||||
|
],
|
||||||
|
|
||||||
|
"sync": [
|
||||||
|
"browserSync",
|
||||||
|
"browserify:dev",
|
||||||
|
"watch",
|
||||||
|
"notify:watch"
|
||||||
|
],
|
||||||
|
|
||||||
|
"build": [
|
||||||
|
"sass",
|
||||||
|
"postcss",
|
||||||
|
"cssmin",
|
||||||
|
"browserify:prod",
|
||||||
|
"uglify",
|
||||||
|
"svgstore",
|
||||||
|
"svgmin",
|
||||||
|
"notify:build"
|
||||||
|
],
|
||||||
|
|
||||||
|
"w": [
|
||||||
|
"browserify:dev",
|
||||||
|
"watch",
|
||||||
|
"notify:watch"
|
||||||
|
],
|
||||||
|
|
||||||
|
"c": [
|
||||||
|
"csscomb"
|
||||||
|
],
|
||||||
|
|
||||||
|
"j": [
|
||||||
|
"eslint"
|
||||||
|
],
|
||||||
|
|
||||||
|
"p": [
|
||||||
|
"phplint"
|
||||||
|
]
|
||||||
|
}
|
||||||
18
build/grunt/config/browserSync.js
Normal file
18
build/grunt/config/browserSync.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
module.exports = {
|
||||||
|
options: {
|
||||||
|
proxy : 'localhost',
|
||||||
|
port : 3000,
|
||||||
|
watchTask : true,
|
||||||
|
notify : false
|
||||||
|
},
|
||||||
|
dev: {
|
||||||
|
bsFiles: {
|
||||||
|
src : [
|
||||||
|
'<%= paths.css.dist %>/**/*.css',
|
||||||
|
'<%= paths.js.dist %>/**/*.js',
|
||||||
|
'<%= paths.img.dist %>/**/*.svg',
|
||||||
|
'**/*.php'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
34
build/grunt/config/browserify.js
Normal file
34
build/grunt/config/browserify.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
module.exports = {
|
||||||
|
options: {
|
||||||
|
browserifyOptions: {
|
||||||
|
debug: false
|
||||||
|
},
|
||||||
|
exclude: "",
|
||||||
|
transform: [
|
||||||
|
[ 'babelify', { presets: [ 'es2015' ] } ]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
dev: {
|
||||||
|
options: {
|
||||||
|
browserifyOptions: {
|
||||||
|
debug: true
|
||||||
|
},
|
||||||
|
watch: true
|
||||||
|
},
|
||||||
|
src: [
|
||||||
|
'<%= paths.js.src %>/**/*.js',
|
||||||
|
'!<%= paths.js.src %>/vendors/**/*.js'
|
||||||
|
],
|
||||||
|
dest: '<%= paths.js.dist %>/app.js'
|
||||||
|
},
|
||||||
|
prod: {
|
||||||
|
options: {
|
||||||
|
banner: '/*! <%= package.title %> - <%= grunt.template.today("yyyy-mm-dd") %> */\n'
|
||||||
|
},
|
||||||
|
src: [
|
||||||
|
'<%= paths.js.src %>/**/*.js',
|
||||||
|
'!<%= paths.js.src %>/vendors/**/*.js'
|
||||||
|
],
|
||||||
|
dest: '<%= paths.js.dist %>/app.js'
|
||||||
|
}
|
||||||
|
};
|
||||||
12
build/grunt/config/concat.js
Normal file
12
build/grunt/config/concat.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
module.exports = {
|
||||||
|
options: {
|
||||||
|
stripBanners: true
|
||||||
|
},
|
||||||
|
prod: {
|
||||||
|
options: {
|
||||||
|
banner: '/*! Dependencies for <%= package.title %> - <%= grunt.template.today("yyyy-mm-dd") %> */\n'
|
||||||
|
},
|
||||||
|
src : [ '<%= paths.js.src %>/vendors/**/*.js' ],
|
||||||
|
dest : '<%= paths.js.dist %>/vendors.js'
|
||||||
|
}
|
||||||
|
};
|
||||||
15
build/grunt/config/csscomb.js
Normal file
15
build/grunt/config/csscomb.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
module.exports = {
|
||||||
|
options: {
|
||||||
|
config: '.csscomb.json'
|
||||||
|
},
|
||||||
|
dev: {
|
||||||
|
files: [
|
||||||
|
{
|
||||||
|
expand : true,
|
||||||
|
cwd : '<%= paths.css.src %>',
|
||||||
|
src : [ '**/*.scss', '!base/_fonts.scss' ],
|
||||||
|
dest : '<%= paths.css.src %>'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
13
build/grunt/config/cssmin.js
Normal file
13
build/grunt/config/cssmin.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
module.exports = {
|
||||||
|
options: {},
|
||||||
|
prod: {
|
||||||
|
files: [
|
||||||
|
{
|
||||||
|
expand : true,
|
||||||
|
cwd : '<%= paths.css.dist %>',
|
||||||
|
src : [ '**/*.css', '!**/*.min.css' ],
|
||||||
|
dest : '<%= paths.css.dist %>'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
11
build/grunt/config/eslint.js
Normal file
11
build/grunt/config/eslint.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
module.exports = {
|
||||||
|
options: {
|
||||||
|
quiet : false,
|
||||||
|
format : require('eslint-tap'),
|
||||||
|
configFile : '.eslintrc'
|
||||||
|
},
|
||||||
|
dev: [
|
||||||
|
'<%= paths.js.src %>/**/*.js',
|
||||||
|
'!<%= paths.js.src %>/vendors/**/*.js'
|
||||||
|
]
|
||||||
|
};
|
||||||
@@ -1,31 +1,35 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
notify_hooks: {
|
||||||
|
options: {
|
||||||
|
enabled : true,
|
||||||
|
success : true,
|
||||||
|
duration : 3,
|
||||||
|
title : '<%= package.name %>',
|
||||||
|
max_jshint_notifications : 5
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
options: {
|
options: {
|
||||||
// title: '<%= pkg.title %>',
|
|
||||||
message: 'Keeping an eye out, Chief!'
|
message: 'Keeping an eye out, Chief!'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
options: {
|
options: {
|
||||||
// title: '<%= pkg.title %>',
|
|
||||||
message: 'Everything is ready to go!'
|
message: 'Everything is ready to go!'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sass: {
|
sass: {
|
||||||
options: {
|
options: {
|
||||||
// title: '<%= pkg.title %>',
|
|
||||||
message: 'CSS is compiled'
|
message: 'CSS is compiled'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
javascript: {
|
javascript: {
|
||||||
options: {
|
options: {
|
||||||
// title: '<%= pkg.title %>',
|
|
||||||
message: 'JavaScript is compiled'
|
message: 'JavaScript is compiled'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
svg: {
|
svg: {
|
||||||
options: {
|
options: {
|
||||||
// title: '<%= pkg.title %>',
|
|
||||||
message: 'SVG is concatenated'
|
message: 'SVG is concatenated'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
options: {
|
options: {
|
||||||
swapPath: '/tmp',
|
swapPath : '/tmp',
|
||||||
phpArgs : {
|
phpArgs : {
|
||||||
// add -f for fatal errors
|
// add -f for fatal errors
|
||||||
'-lf': null
|
'-lf': null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
dev: [
|
||||||
project: [
|
|
||||||
'**/*.php'
|
'**/*.php'
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
;
|
|
||||||
27
build/grunt/config/postcss.js
Normal file
27
build/grunt/config/postcss.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
module.exports = function (grunt, options)
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
options: {
|
||||||
|
map: false,
|
||||||
|
processors: [
|
||||||
|
require('autoprefixer')({
|
||||||
|
browsers: [ 'last 2 versions', '> 1%', 'ie >= 9' ]
|
||||||
|
}),
|
||||||
|
require('postcss-banner')({
|
||||||
|
banner: grunt.template.process('! <%= package.title %> - <%= grunt.template.today("yyyy-mm-dd") %> ', { data: options })
|
||||||
|
})
|
||||||
|
]
|
||||||
|
},
|
||||||
|
prod: {
|
||||||
|
files: [
|
||||||
|
{
|
||||||
|
expand : true,
|
||||||
|
flatten : true,
|
||||||
|
cwd : '<%= paths.css.dist %>',
|
||||||
|
src : [ '**/*.css', '!**/*.min.css' ],
|
||||||
|
dest : '<%= paths.css.dist %>'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
17
build/grunt/config/sass.js
Normal file
17
build/grunt/config/sass.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
module.exports = {
|
||||||
|
options: {
|
||||||
|
sourceMap : false,
|
||||||
|
outputStyle : 'expanded'
|
||||||
|
},
|
||||||
|
prod: {
|
||||||
|
files: [
|
||||||
|
{
|
||||||
|
expand : true,
|
||||||
|
cwd : '<%= paths.css.src %>',
|
||||||
|
src : [ '**/*.scss' ],
|
||||||
|
dest : '<%= paths.css.dist %>',
|
||||||
|
ext : '.css'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -14,11 +14,9 @@ module.exports = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
dist: {
|
dist: {
|
||||||
expand: true,
|
expand : true,
|
||||||
cwd: 'www/assets/images/',
|
cwd : '<%= paths.img.dist %>',
|
||||||
src: '*.svg',
|
src : '*.svg',
|
||||||
dest: 'www/assets/images/',
|
dest : '<%= paths.img.dist %>'
|
||||||
ext: '.svg',
|
|
||||||
extDot: 'first'
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
8
build/grunt/config/svgstore.js
Normal file
8
build/grunt/config/svgstore.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
module.exports = {
|
||||||
|
options: {},
|
||||||
|
prod: {
|
||||||
|
files: {
|
||||||
|
'<%= paths.img.dist %>/sprite.svg': [ '<%= paths.img.src %>/sprite/*.svg' ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
13
build/grunt/config/uglify.js
Normal file
13
build/grunt/config/uglify.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
module.exports = {
|
||||||
|
options: {},
|
||||||
|
prod: {
|
||||||
|
files: [
|
||||||
|
{
|
||||||
|
expand : true,
|
||||||
|
cwd : '<%= paths.js.dist %>',
|
||||||
|
src : [ '**/*.js', '!**/*.min.js' ],
|
||||||
|
dest : '<%= paths.js.dist %>'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
27
build/grunt/config/watch.js
Normal file
27
build/grunt/config/watch.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
module.exports = {
|
||||||
|
options: {
|
||||||
|
spawn: false,
|
||||||
|
livereload: false
|
||||||
|
},
|
||||||
|
javascript_vendors: {
|
||||||
|
files: [ '<%= paths.js.src %>/vendors/**/*.js' ],
|
||||||
|
tasks: [ 'concat:vendors', 'notify:javascript' ]
|
||||||
|
},
|
||||||
|
sass: {
|
||||||
|
files: [ '<%= paths.css.src %>/**/*.scss' ],
|
||||||
|
tasks: [ 'sass', 'postcss', 'notify:sass' ]
|
||||||
|
},
|
||||||
|
svg: {
|
||||||
|
files: [ '<%= paths.img.src %>/**/*.svg' ],
|
||||||
|
tasks: [ 'svgstore', 'notify:svg' ]
|
||||||
|
},
|
||||||
|
tasks: {
|
||||||
|
options: {
|
||||||
|
reload: true
|
||||||
|
},
|
||||||
|
files: [
|
||||||
|
'Gruntfile.js',
|
||||||
|
'<%= paths.grunt %>/**/*'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
options: {
|
|
||||||
config: '.csscomb.json'
|
|
||||||
},
|
|
||||||
build: {
|
|
||||||
expand: true,
|
|
||||||
cwd: 'assets/styles/',
|
|
||||||
src: ['**/*.scss', '!base/_fonts.scss'],
|
|
||||||
dest: 'assets/styles/'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
combine: {
|
|
||||||
files: [{
|
|
||||||
expand: true,
|
|
||||||
cwd: 'www/assets/styles/',
|
|
||||||
src: '*.css',
|
|
||||||
dest: 'www/assets/styles/'
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
options: {
|
|
||||||
format: require('eslint-tap'),
|
|
||||||
configFile: '.eslintrc'
|
|
||||||
},
|
|
||||||
target: [
|
|
||||||
'assets/scripts/**/*.js',
|
|
||||||
'!assets/scripts/vendors/*.js'
|
|
||||||
],
|
|
||||||
};
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
postcss: {
|
|
||||||
options: {
|
|
||||||
processors: [
|
|
||||||
require('autoprefixer')({
|
|
||||||
browsers: ['last 2 versions', '> 1%', 'ie >= 9']
|
|
||||||
}),
|
|
||||||
]
|
|
||||||
},
|
|
||||||
files: [
|
|
||||||
{
|
|
||||||
src : ['www/assets/styles/*.css'],
|
|
||||||
dest : 'www/assets/styles/',
|
|
||||||
expand : true,
|
|
||||||
flatten : true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
options: {
|
|
||||||
sourceMap: false
|
|
||||||
},
|
|
||||||
dist: {
|
|
||||||
files: {
|
|
||||||
'www/assets/styles/main.css': 'assets/styles/main.scss'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
options: {
|
|
||||||
|
|
||||||
},
|
|
||||||
default : {
|
|
||||||
files: {
|
|
||||||
'www/assets/images/sprite.svg': ['assets/images/sprite/*.svg'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
target: {
|
|
||||||
files: [{
|
|
||||||
expand: true,
|
|
||||||
cwd: 'www/assets/scripts/',
|
|
||||||
src: '**/*.js',
|
|
||||||
dest: 'www/assets/scripts/'
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
javascript_vendors: {
|
|
||||||
files: [
|
|
||||||
'assets/scripts/vendors/*.js'
|
|
||||||
],
|
|
||||||
tasks: ['concat:vendors', 'notify:javascript']
|
|
||||||
},
|
|
||||||
sass: {
|
|
||||||
files: ['assets/styles/**/*.scss'],
|
|
||||||
tasks: ['sass', 'postcss', 'notify:sass'],
|
|
||||||
options: {
|
|
||||||
spawn: false,
|
|
||||||
livereload: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
svg: {
|
|
||||||
files: ['assets/images/**/*.svg'],
|
|
||||||
tasks: ['svgstore', 'notify:svg']
|
|
||||||
},
|
|
||||||
tasks: {
|
|
||||||
files: ['build/grunt/*.js'],
|
|
||||||
options: {
|
|
||||||
reload: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "boilerplate",
|
"private": true,
|
||||||
|
"name": "@locomotivemtl/boilerplate",
|
||||||
|
"title": "Locomotive Boilerplate",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"author": "Locomotive <info@locomotive.ca>",
|
"author": "Locomotive <info@locomotive.ca>",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -12,7 +14,7 @@
|
|||||||
"grunt-browser-sync": "2.2.0",
|
"grunt-browser-sync": "2.2.0",
|
||||||
"grunt-browserify": "4.0.1",
|
"grunt-browserify": "4.0.1",
|
||||||
"grunt-contrib-concat": "1.0.0",
|
"grunt-contrib-concat": "1.0.0",
|
||||||
"grunt-contrib-cssmin": "1.0.0",
|
"grunt-contrib-cssmin": "^1.0.1",
|
||||||
"grunt-contrib-uglify": "1.0.0",
|
"grunt-contrib-uglify": "1.0.0",
|
||||||
"grunt-contrib-watch": "0.6.1",
|
"grunt-contrib-watch": "0.6.1",
|
||||||
"grunt-csscomb": "3.1.0",
|
"grunt-csscomb": "3.1.0",
|
||||||
@@ -23,6 +25,7 @@
|
|||||||
"grunt-sass": "1.1.0",
|
"grunt-sass": "1.1.0",
|
||||||
"grunt-svgmin": "3.1.2",
|
"grunt-svgmin": "3.1.2",
|
||||||
"grunt-svgstore": "1.0.0",
|
"grunt-svgstore": "1.0.0",
|
||||||
"load-grunt-tasks": "3.4.1"
|
"load-grunt-config": "^0.19.1",
|
||||||
|
"postcss-banner": "^1.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user