Skip to content

Commit

Permalink
Updating signatures to return new Promise() where applicable (groun…
Browse files Browse the repository at this point in the history
…d work for move to `async/await`), updating dependencies & lint
  • Loading branch information
avoidwork committed Feb 6, 2018
1 parent 7c7d698 commit 9cb9aa4
Show file tree
Hide file tree
Showing 11 changed files with 3,696 additions and 1,895 deletions.
6 changes: 0 additions & 6 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
"es6": true,
"amd": true
},
"ecmaFeatures": {
"jsx": false,
"superInFunctions": false,
"classes": false,
"modules": [2]
},
"rules": {
"arrow-parens": [2, "as-needed"],
"arrow-spacing": [2, {"before": true, "after": true}],
Expand Down
82 changes: 40 additions & 42 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
module.exports = function (grunt) {
grunt.initConfig({
pkg : grunt.file.readJSON("package.json"),
pkg: grunt.file.readJSON("package.json"),
concat: {
options : {
banner : "/**\n" +
" * <%= pkg.description %>\n" +
" *\n" +
" * @author <%= pkg.author %>\n" +
" * @copyright <%= grunt.template.today('yyyy') %>\n" +
" * @license <%= pkg.license %>\n" +
" * @version <%= pkg.version %>\n" +
" */\n"
options: {
banner: "/**\n" +
" * <%= pkg.description %>\n" +
" *\n" +
" * @author <%= pkg.author %>\n" +
" * @copyright <%= grunt.template.today('yyyy') %>\n" +
" * @license <%= pkg.license %>\n" +
" * @version <%= pkg.version %>\n" +
" */\n"
},
dist: {
src : [
src: [
"src/intro.js",
"src/utility.js",
"src/haro.js",
"src/factory.js",
"src/outro.js"
],
dest : "lib/<%= pkg.name %>.es6.js"
dest: "lib/<%= pkg.name %>.es6.js"
}
},
babel: {
options: {
sourceMap: false,
presets: ["babel-preset-es2015"]
presets: ["babel-preset-env"]
},
dist: {
files: {
Expand All @@ -36,21 +36,21 @@ module.exports = function (grunt) {
},
eslint: {
target: [
"index.js",
"Gruntfile.js",
"lib/<%= pkg.name %>.es6.js",
"test/*.js"
]
},
nodeunit : {
all : ["test/*.js"]
nodeunit: {
all: ["test/*.js"]
},
replace: {
dist: {
options: {
patterns: [
{
match: /{{VERSION}}/,
replacement: '<%= pkg.version %>'
replacement: "<%= pkg.version %>"
}
]
},
Expand All @@ -61,7 +61,7 @@ module.exports = function (grunt) {
src: [
"lib/<%= pkg.name %>.es6.js"
],
dest: 'lib/'
dest: "lib/"
}
]
}
Expand All @@ -71,37 +71,35 @@ module.exports = function (grunt) {
banner: '/* <%= grunt.template.today("yyyy") %> <%= pkg.author %> */\n',
sourceMap: true,
sourceMapIncludeSources: true,
mangle: {
except: [
"Map",
"Set",
"Haro",
"cast",
"clone",
"createIndexes",
"each",
"iterate",
"keyIndex",
"joinData",
"setIndexValue",
"setIndex"
]
}
reserved: [
"Map",
"Set",
"Haro",
"cast",
"clone",
"createIndexes",
"each",
"iterate",
"keyIndex",
"joinData",
"setIndexValue",
"setIndex"
]
},
target: {
files: {
"lib/<%= pkg.name %>.min.js" : ["lib/<%= pkg.name %>.js"]
"lib/<%= pkg.name %>.min.js": ["lib/<%= pkg.name %>.js"]
}
}
},
watch : {
js : {
files : "<%= concat.dist.src %>",
tasks : "default"
watch: {
js: {
files: "<%= concat.dist.src %>",
tasks: "default"
},
pkg: {
files : "package.json",
tasks : "default"
files: "package.json",
tasks: "default"
}
}
});
Expand All @@ -119,4 +117,4 @@ module.exports = function (grunt) {
grunt.registerTask("test", ["eslint", "nodeunit"]);
grunt.registerTask("build", ["concat", "replace", "babel", "uglify"]);
grunt.registerTask("default", ["build", "test"]);
};
};
Loading

0 comments on commit 9cb9aa4

Please sign in to comment.