Skip to content

Commit

Permalink
Merge pull request #159 from feathersjs/generator-refactoring
Browse files Browse the repository at this point in the history
Generator refactoring
  • Loading branch information
daffl committed Aug 25, 2018
1 parent 7ee18e3 commit a2a739e
Show file tree
Hide file tree
Showing 75 changed files with 5,799 additions and 1,966 deletions.
3 changes: 0 additions & 3 deletions packages/generator-feathers/.babelrc

This file was deleted.

26 changes: 26 additions & 0 deletions packages/generator-feathers/.eslintrc.json
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"
]
}
}
30 changes: 0 additions & 30 deletions packages/generator-feathers/.jshintrc

This file was deleted.

6 changes: 3 additions & 3 deletions packages/generator-feathers/.travis.yml
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
10 changes: 5 additions & 5 deletions packages/generator-feathers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ npm start
# short alias for generate new application
yo feathers

# generate new application
yo feathers:app
# set up authentication
yo feathers:authentication

# set up a database connection
yo feathers:connection

# generate new hook
yo feathers:hook

# generate new middleware
yo feathers:middleware

# generate new model
yo feathers:model

# generate new service
yo feathers:service
```
Expand Down
79 changes: 0 additions & 79 deletions packages/generator-feathers/generators/app/auth-mapping.json

This file was deleted.

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;
};
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;
};
5 changes: 5 additions & 0 deletions packages/generator-feathers/generators/app/configs/index.js
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 packages/generator-feathers/generators/app/configs/package.json.js
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;
};
Loading

0 comments on commit a2a739e

Please sign in to comment.