Skip to content

Commit

Permalink
Update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidArchibald committed Mar 21, 2021
1 parent 642fbc6 commit 6287e7c
Show file tree
Hide file tree
Showing 6 changed files with 7,393 additions and 179 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
lib
80 changes: 40 additions & 40 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,35 @@ module.exports = function (grunt) {
options: {
configFile: "eslint.yaml"
},
"json-asty": [ "src/**/*.js", "tst/**/*.js" ]
"json-asty": ["src/**/*.js", "tst/**/*.js"]
},
browserify: {
"json-asty-browser": {
files: {
"lib/json-asty.browser.js": [ "src/json-asty.js" ]
"lib/json-asty.browser.js": ["src/json-asty.js"]
},
options: {
transform: [
[ "envify", { PLATFORM: "browser" } ],
[ "babelify", {
["envify", { PLATFORM: "browser" }],
["babelify", {
presets: [
[ "@babel/preset-env", {
"targets": {
"browsers": "last 2 versions, > 1%, ie 11"
["@babel/preset-env", {
targets: {
browsers: "last 2 versions, > 1%, ie 11"
}
} ]
}]
],
plugins: [ [ "@babel/plugin-transform-runtime", {
"helpers": false,
"regenerator": false
} ] ]
} ],
[ "uglifyify", { sourceMap: false, global: true } ],
plugins: [["@babel/plugin-transform-runtime", {
helpers: false,
regenerator: false
}]]
}],
["uglifyify", { sourceMap: false, global: true }],
"pegjs-otf/transform"
],
plugin: [
[ "browserify-derequire" ],
[ "browserify-header" ]
["browserify-derequire"],
["browserify-header"]
],
browserifyOptions: {
standalone: "JsonAsty",
Expand All @@ -72,30 +72,30 @@ module.exports = function (grunt) {
},
"json-asty-node": {
files: {
"lib/json-asty.node.js": [ "src/json-asty.js" ]
"lib/json-asty.node.js": ["src/json-asty.js"]
},
options: {
transform: [
[ "envify", { PLATFORM: "node" } ],
[ "babelify", {
["envify", { PLATFORM: "node" }],
["babelify", {
presets: [
[ "@babel/preset-env", {
"targets": {
"node": "8.0.0"
["@babel/preset-env", {
targets: {
node: "8.0.0"
}
} ]
}]
],
plugins: [ [ "@babel/plugin-transform-runtime", {
"helpers": false,
"regenerator": false
} ] ]
} ],
[ "uglifyify", { sourceMap: false, global: true } ],
plugins: [["@babel/plugin-transform-runtime", {
helpers: false,
regenerator: false
}]]
}],
["uglifyify", { sourceMap: false, global: true }],
"pegjs-otf/transform"
],
plugin: [
[ "browserify-derequire" ],
[ "browserify-header" ]
["browserify-derequire"],
["browserify-header"]
],
external: [
"asty-astq",
Expand All @@ -111,26 +111,26 @@ module.exports = function (grunt) {
},
mochaTest: {
"json-asty": {
src: [ "tst/*.js" ]
src: ["tst/*.js"]
},
options: {
reporter: "spec"
}
},
clean: {
clean: [ "lib" ],
distclean: [ "node_modules" ]
clean: ["lib"],
distclean: ["node_modules"]
},
watch: {
"src": {
files: [ "src/**/*.js" ],
tasks: [ "default" ],
src: {
files: ["src/**/*.js"],
tasks: ["default"],
options: {}
}
}
})
grunt.registerTask("default", [ "eslint", "browserify", "test" ])
grunt.registerTask("dev", [ "default", "watch" ])
grunt.registerTask("test", [ "mochaTest" ])
grunt.registerTask("default", ["eslint", "browserify", "test"])
grunt.registerTask("dev", ["default", "watch"])
grunt.registerTask("test", ["mochaTest"])
}

Loading

0 comments on commit 6287e7c

Please sign in to comment.