-
-
Notifications
You must be signed in to change notification settings - Fork 751
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 #159 from feathersjs/generator-refactoring
Generator refactoring
- Loading branch information
Showing
75 changed files
with
5,799 additions
and
1,966 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
{ | ||
"env": { | ||
"es6": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,5 +1,5 @@ | ||
language: node_js | ||
services: mongodb | ||
node_js: | ||
- '0.12' | ||
- '4.4.0' | ||
- 'node' | ||
- 6 | ||
- node |
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
79 changes: 0 additions & 79 deletions
79
packages/generator-feathers/generators/app/auth-mapping.json
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
packages/generator-feathers/generators/app/configs/config.default.json.js
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,15 @@ | ||
'use strict'; | ||
|
||
module.exports = function() { | ||
const config = { | ||
host: 'localhost', | ||
port: 3030, | ||
public: '../public/', | ||
paginate: { | ||
default: 10, | ||
max: 50 | ||
} | ||
}; | ||
|
||
return config; | ||
}; |
11 changes: 11 additions & 0 deletions
11
packages/generator-feathers/generators/app/configs/config.production.json.js
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,11 @@ | ||
'use strict'; | ||
|
||
module.exports = function(generator) { | ||
const { props } = generator; | ||
const config = { | ||
host: `${props.name}-app.feathersjs.com`, | ||
port: `PORT` | ||
}; | ||
|
||
return config; | ||
}; |
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,5 @@ | ||
module.exports = { | ||
configDefault: require('./config.default.json.js'), | ||
configProduction: require('./config.production.json.js'), | ||
package: require('./package.json.js') | ||
}; |
37 changes: 37 additions & 0 deletions
37
packages/generator-feathers/generators/app/configs/package.json.js
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,37 @@ | ||
'use strict'; | ||
|
||
module.exports = function(generator) { | ||
const { props } = generator; | ||
const lib = props.src; | ||
const [ packager, version ] = props.packager.split('@'); | ||
const pkg = { | ||
name: props.name, | ||
description: props.description, | ||
version: '0.0.0', | ||
homepage: '', | ||
main: lib, | ||
keywords: [ | ||
'feathers' | ||
], | ||
license: 'MIT', | ||
repository: {}, | ||
author: {}, | ||
contributors: [], | ||
bugs: {}, | ||
directories: { | ||
lib | ||
}, | ||
engines: { | ||
node: '>= 6.0.0', | ||
[packager]: version | ||
}, | ||
'scripts': { | ||
test: 'npm run eslint && npm run mocha', | ||
eslint: `eslint ${lib}/. test/. --config .eslintrc.json`, | ||
start: `node ${lib}/`, | ||
mocha: 'mocha test/ --recursive' | ||
} | ||
}; | ||
|
||
return pkg; | ||
}; |
Oops, something went wrong.