Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Add npm publish to release task #1473

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,000 changes: 69 additions & 931 deletions Gruntfile.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions grunt/config/blanket_qunit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = function (grunt) {

return {
source: {
options: {
urls: ['http://localhost:' + '<%= connectTestServerOptionsPort %>' + '/test/?coverage=true&gruntReport'],
threshold: 1,
globalThreshold: 1
}
}
}

};
7 changes: 7 additions & 0 deletions grunt/config/browserify.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
commonjs: {
files: {
'test/commonjs-bundle.js': ['test/commonjs-test.js']
}
}
};
12 changes: 12 additions & 0 deletions grunt/config/bump.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
options: {
files: ['package.json'],
updateConfigs: ['pkg'],
commit: false,
createTag: false,
tagName: '%VERSION%',
tagMessage: '%VERSION%',
push: false,
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d'
}
};
5 changes: 5 additions & 0 deletions grunt/config/clean.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
dist: ['dist'],
zipsrc: ['dist/fuelux'],
screenshots: ['page-at-timeout-*.jpg']
};
13 changes: 13 additions & 0 deletions grunt/config/compress.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
zip: {
files: [{
cwd: 'dist/',
expand: true,
src: ['fuelux/**']
}],
options: {
archive: 'dist/fuelux.zip',
mode: 'zip'
}
}
};
38 changes: 38 additions & 0 deletions grunt/config/concat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = function (grunt) {

return {
fuelux: {
src: ['js/checkbox.js',
'js/combobox.js',
'js/datepicker.js',
'js/dropdown-autoflip.js',
'js/loader.js',
'js/placard.js',
'js/radio.js',
'js/search.js',
'js/selectlist.js',
'js/spinbox.js',
'js/tree.js',
'js/wizard.js',
'js/infinite-scroll.js',
'js/pillbox.js',
'js/repeater.js',
'js/repeater-list.js',
'js/repeater-thumbnail.js',
'js/scheduler.js'
],
dest: 'dist/js/' + '<%= pkg.name %>' + '.js'
},
options: {
banner: '<%= banner %>' + '\n\n// For more information on UMD visit: https://github.com/umdjs/umd/\n(function (factory) {\n\tif (typeof define === \'function\' && define.amd) {\n\t\tdefine([\'jquery\', \'bootstrap\'], factory);\n\t} else {\n\t\tfactory(jQuery);\n\t}\n}(function (jQuery) {\n\n<%= jqueryCheck %><%= bootstrapCheck %>',
footer: '\n}));',
process: function (source) {
source = '(function ($) {\n\n' +
source.replace(/\/\/ -- BEGIN UMD WRAPPER PREFACE --(\n|.)*\/\/ -- END UMD WRAPPER PREFACE --/g, '');
source = source.replace(/\/\/ -- BEGIN UMD WRAPPER AFTERWORD --(\n|.)*\/\/ -- END UMD WRAPPER AFTERWORD --/g, '') + '\n})(jQuery);\n\n';
return source;
}
}
}

};
32 changes: 32 additions & 0 deletions grunt/config/connect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = function (grunt) {

return {
server: {
options: {
hostname: '*',
base: {
path: '.',
options: {
index: ['index.html', 'tests.html']
}
},
port: 8000,
useAvailablePort: true
}
},
testServer: {
options: {
base: {
path: '.',
options: {
index: ['index.html', 'tests.html']
}
},
hostname: '*',
port: '<%= connectTestServerOptionsPort %>',
useAvailablePort: true
}
}
}

};
15 changes: 15 additions & 0 deletions grunt/config/copy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
fonts: {
cwd: 'fonts/',
dest: 'dist/fonts/',
expand: true,
filter: 'isFile',
src: ['*']
},
zipsrc: {
cwd: 'dist/',
dest: 'dist/fuelux/',
expand: true,
src: ['**']
}
};
11 changes: 11 additions & 0 deletions grunt/config/htmllint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
options: {
ignore:[
'Section lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all sections.',
'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
'Element head is missing a required instance of child element title.'
],
force: true
},
src: ['index.html', 'markup/*.html', 'test/markup/*.html']
};
23 changes: 23 additions & 0 deletions grunt/config/jsbeautifier.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
files: ['dist/js/fuelux.js'],
options: {
js: {
braceStyle: 'collapse',
breakChainedMethods: false,
e4x: false,
evalCode: false,
indentLevel: 0,
indentSize: 4,
indentWithTabs: true,
jslintHappy: false,
keepArrayIndentation: false,
keepFunctionIndentation: false,
maxPreserveNewlines: 10,
preserveNewlines: true,
spaceBeforeConditional: true,
spaceInParen: true,
unescapeStrings: false,
wrapLineLength: 0
}
}
};
33 changes: 33 additions & 0 deletions grunt/config/jshint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
options: {
boss: true,
browser: true,
curly: false,
eqeqeq: true,
eqnull: true,
globals: {
jQuery: true,
define: true,
require: true,
module: true
},
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
unused: false
},
sourceAndDist: ['Gruntfile.js', 'js/*.js', 'dist/fuelux.js'],
tests: {
options: {
latedef: false,
undef: false,
unused: false
},
files: {
src: ['test/**/*.js', '!test/commonjs-bundle.js']
}
}
};
47 changes: 47 additions & 0 deletions grunt/config/less.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = function (grunt) {

var minifiedOutput = 'dist/css/' + '<%= pkg.name %>' + '.min.css';

var minifyFiles = function() {
var minifyFiles = {};
var output = 'dist/css/' + '<%= pkg.name %>' + '.min.css'
minifyFiles[output] = 'dist/css/' + '<%= pkg.name %>' + '.css'
return minifyFiles
};

return {
dev: {
options: {
strictMath: true,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: grunt.config('pkg.name') + '-dev.css.map',
sourceMapFilename: 'dist/css/' + '<%= pkg.name %>' + '-dev.css.map'
},
files: {
'dist/css/fuelux-dev.css': 'less/fuelux.less'
}
},
dist: {
options: {
strictMath: true,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>' + '.css.map',
sourceMapFilename: 'dist/css/' + '<%= pkg.name %>' + '.css.map'
},
files: {
'dist/css/fuelux.css': 'less/fuelux.less'
}
},
minify: {
options: {
cleancss: true,
compress: true,
report: 'min'
},
files: minifyFiles()
}
}

};
Loading