This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from reTHINK-project/develop
merging for release
- Loading branch information
Showing
185 changed files
with
1,868 additions
and
13,375 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,120 @@ | ||
plugins: | ||
- import | ||
|
||
extends: | ||
- eslint:recommended | ||
- plugin:import/errors | ||
- plugin:import/warnings | ||
|
||
env: | ||
browser: true | ||
commonjs: true | ||
es6: true | ||
node: true | ||
mocha: true | ||
jquery: true | ||
|
||
parserOptions: | ||
ecmaVersion: 6 | ||
ecmaFeatures: | ||
modules: true | ||
classes: true | ||
sourceType: module | ||
|
||
rules: | ||
no-const-assign: warn | ||
no-this-before-super: warn | ||
no-undef: warn | ||
no-unreachable: warn | ||
no-unused-vars: warn | ||
constructor-super: warn | ||
valid-typeof: warn | ||
quotes: | ||
- error | ||
- single | ||
semi: | ||
- warn | ||
- always | ||
consistent-this: | ||
- warn | ||
- _this | ||
space-before-function-paren: | ||
- error | ||
- never | ||
block-spacing: error | ||
brace-style: | ||
- error | ||
- 1tbs | ||
- allowSingleLine: true | ||
no-console: off | ||
no-empty: | ||
- warn | ||
- allowEmptyCatch: true | ||
no-spaced-func: 2 | ||
array-bracket-spacing: | ||
- warn | ||
- never | ||
- {} | ||
space-in-parens: | ||
- warn | ||
- never | ||
quote-props: | ||
- warn | ||
- as-needed | ||
key-spacing: | ||
- error | ||
- beforeColon: false | ||
afterColon: true | ||
space-unary-ops: | ||
- error | ||
- words: false | ||
nonwords: false | ||
no-mixed-spaces-and-tabs: error | ||
no-trailing-spaces: error | ||
comma-dangle: | ||
- warn | ||
- never | ||
yoda: | ||
- warn | ||
- never | ||
no-with: error | ||
no-multiple-empty-lines: error | ||
no-multi-str: off | ||
one-var: | ||
- error | ||
- never | ||
comma-spacing: | ||
- error | ||
- before: false | ||
after: true | ||
semi-spacing: | ||
- error | ||
- before: false | ||
after: true | ||
space-before-blocks: | ||
- error | ||
- always | ||
wrap-iife: error | ||
comma-style: | ||
- error | ||
- last | ||
space-infix-ops: error | ||
camelcase: | ||
- error | ||
- properties: never | ||
eol-last: error | ||
dot-notation: error | ||
curly: | ||
- error | ||
- multi-line | ||
keyword-spacing: | ||
- error | ||
- {} | ||
lines-around-comment: | ||
- error | ||
- beforeLineComment: true | ||
allowBlockStart: true | ||
indent: | ||
- error | ||
- 2 | ||
- SwitchCase: 1 |
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
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,52 @@ | ||
var fs = require('fs') | ||
var path = require('path'); | ||
var resolve = require('path').resolve; | ||
var join = require('path').join; | ||
var cp = require('child_process'); | ||
|
||
// get library path | ||
var lib = resolve(__dirname, '../src/') | ||
|
||
// https://gist.github.com/kethinov/6658166 | ||
// List all files in a directory in Node.js recursively in a synchronous fashion | ||
const read = (dir, filename) => | ||
fs.readdirSync(dir) | ||
.reduce((files, file) => { | ||
var fsPath = fs.statSync(path.join(dir, file)); | ||
var fileObject = path.parse(path.join(dir, file)); | ||
return fsPath.isDirectory() && !fileObject.dir.includes('node_modules') ? | ||
files.concat(read(path.join(dir, file), filename)) : | ||
file === filename ? files.concat(dir) : files | ||
}, | ||
[]); | ||
|
||
var list = read(lib, 'package.json'); | ||
|
||
var current = 0; | ||
var limit = list.length; | ||
|
||
function queue(list) { | ||
const mod = list[current]; | ||
fs.accessSync(join(mod, 'package.json')); | ||
|
||
const fileObject = path.parse(join(mod, 'package.json')); | ||
|
||
console.log('------------------------------------------------------------------------------'); | ||
console.log(fileObject.dir ); | ||
|
||
// install folder | ||
const sp = cp.spawn('npm', ['i'], { env: process.env, cwd: mod, stdio: 'inherit', shell: true}); | ||
|
||
sp.on('exit', () => { | ||
current++; | ||
console.log(current, limit); | ||
if (current < limit) { | ||
queue(list); | ||
console.log('------------------------------------------------------------------------------'); | ||
} else { | ||
console.log('All done!'); | ||
} | ||
}) | ||
} | ||
|
||
queue(list); |
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,52 @@ | ||
var fs = require('fs') | ||
var path = require('path'); | ||
var resolve = require('path').resolve; | ||
var join = require('path').join; | ||
var cp = require('child_process'); | ||
|
||
// get library path | ||
var lib = resolve(__dirname, '../src/') | ||
|
||
// https://gist.github.com/kethinov/6658166 | ||
// List all files in a directory in Node.js recursively in a synchronous fashion | ||
const read = (dir, filename) => | ||
fs.readdirSync(dir) | ||
.reduce((files, file) => { | ||
var fsPath = fs.statSync(path.join(dir, file)); | ||
var fileObject = path.parse(path.join(dir, file)); | ||
return fsPath.isDirectory() && !fileObject.dir.includes('node_modules') ? | ||
files.concat(read(path.join(dir, file), filename)) : | ||
file === filename ? files.concat(dir) : files | ||
}, | ||
[]); | ||
|
||
var list = read(lib, 'package.json'); | ||
|
||
var current = 0; | ||
var limit = list.length; | ||
|
||
function queue(list) { | ||
const mod = list[current]; | ||
fs.accessSync(join(mod, 'package.json')); | ||
|
||
const fileObject = path.parse(join(mod, 'package.json')); | ||
|
||
console.log('------------------------------------------------------------------------------'); | ||
console.log(fileObject.dir ); | ||
|
||
// install folder | ||
const sp = cp.spawn('npm', ['update'], { env: process.env, cwd: mod, stdio: 'inherit', shell: true}); | ||
|
||
sp.on('exit', () => { | ||
current++; | ||
console.log(current, limit); | ||
if (current < limit) { | ||
queue(list); | ||
console.log('------------------------------------------------------------------------------'); | ||
} else { | ||
console.log('All done!'); | ||
} | ||
}) | ||
} | ||
|
||
queue(list); |
Oops, something went wrong.