-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,079 additions
and
1,047 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
max_line_length = 120 | ||
|
||
[{*.markdown, *.md}] | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
|
||
[{*.yaml, *.yml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 4, | ||
"useTabs": false, | ||
"semi": true, | ||
"bracketSpacing": true, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
const concat = require('concat-files'); | ||
const glob = require('glob'); | ||
const fs = require('fs') | ||
const fs = require('fs'); | ||
|
||
const DIR = './dist'; | ||
|
||
if (!fs.existsSync(DIR)){ | ||
if (!fs.existsSync(DIR)) { | ||
fs.mkdirSync(DIR); | ||
} | ||
|
||
const rules = glob.sync('./greenit-core/rules/*.js') | ||
const rules = glob.sync('./greenit-core/rules/*.js'); | ||
|
||
//One script to analyse them all | ||
concat([ | ||
'./greenit-core/analyseFrameCore.js', | ||
'./greenit-core/utils.js', | ||
'./greenit-core/rulesManager.js', | ||
'./greenit-core/ecoIndex.js', | ||
...rules, | ||
'./greenit-core/greenpanel.js' | ||
], './dist/bundle.js', function(err) { | ||
if (err) throw err | ||
console.log('build complete'); | ||
}); | ||
concat( | ||
[ | ||
'./greenit-core/analyseFrameCore.js', | ||
'./greenit-core/utils.js', | ||
'./greenit-core/rulesManager.js', | ||
'./greenit-core/ecoIndex.js', | ||
...rules, | ||
'./greenit-core/greenpanel.js', | ||
], | ||
'./dist/bundle.js', | ||
function (err) { | ||
if (err) throw err; | ||
console.log('build complete'); | ||
} | ||
); |
Oops, something went wrong.