Skip to content

Commit 1faca0e

Browse files
author
Scott Prue
committed
Initial commit. Generator started using generator-generator.
0 parents  commit 1faca0e

File tree

11 files changed

+314
-0
lines changed

11 files changed

+314
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.DS_Store
3+
**/.DS_Store

.yo-rc.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"generator-generator": {
3+
"structure": "nested"
4+
}
5+
}

README.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# generator-webpack-redux-react
2+
3+
Helps start and build projects using [React](https://facebook.github.io/react/) and [Redux](https://github.com/rackt/redux).
4+
5+
> [Yeoman](http://yeoman.io) generator
6+
7+
8+
## Getting Started
9+
10+
### What is Yeoman?
11+
12+
Trick question. It's not a thing. It's this guy:
13+
14+
![](http://i.imgur.com/JHaAlBJ.png)
15+
16+
Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.
17+
18+
Not every new computer comes with a Yeoman pre-installed. He lives in the [npm](https://npmjs.org) package repository. You only have to ask for him once, then he packs up and moves into your hard drive. *Make sure you clean up, he likes new and shiny things.*
19+
20+
```bash
21+
npm install -g yo
22+
```
23+
24+
### Yeoman Generators
25+
26+
Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.
27+
28+
To install generator-generator-kyper-react from npm, run:
29+
30+
```bash
31+
npm install -g generator-generator-kyper-react
32+
```
33+
34+
Finally, initiate the generator:
35+
36+
```bash
37+
yo generator kyper react
38+
```
39+
40+
### Getting To Know Yeoman
41+
42+
Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.
43+
44+
If you'd like to get to know Yeoman better and meet some of his friends, [Grunt](http://gruntjs.com) and [Bower](http://bower.io), check out the complete [Getting Started Guide](https://github.com/yeoman/yeoman/wiki/Getting-Started).
45+
46+
47+
## License
48+
49+
MIT

generators/app/index.js

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
'use strict';
2+
var yeoman = require('yeoman-generator');
3+
var chalk = require('chalk');
4+
var yosay = require('yosay');
5+
6+
module.exports = yeoman.generators.Base.extend({
7+
prompting: function () {
8+
var done = this.async();
9+
10+
// Have Yeoman greet the user.
11+
this.log(yosay(
12+
'Welcome to the exceptional ' + chalk.red('GeneratorReactRedux') + ' generator!'
13+
));
14+
15+
var prompts = [{
16+
type: 'confirm',
17+
name: 'someOption',
18+
message: 'Would you like to enable this option?',
19+
default: true
20+
}];
21+
22+
this.prompt(prompts, function (props) {
23+
this.props = props;
24+
// To access props later use this.props.someOption;
25+
26+
done();
27+
}.bind(this));
28+
},
29+
30+
writing: {
31+
app: function () {
32+
this.fs.copy(
33+
this.templatePath('_package.json'),
34+
this.destinationPath('package.json')
35+
);
36+
this.fs.copy(
37+
this.templatePath('_bower.json'),
38+
this.destinationPath('bower.json')
39+
);
40+
},
41+
42+
projectfiles: function () {
43+
this.fs.copy(
44+
this.templatePath('editorconfig'),
45+
this.destinationPath('.editorconfig')
46+
);
47+
this.fs.copy(
48+
this.templatePath('jshintrc'),
49+
this.destinationPath('.jshintrc')
50+
);
51+
}
52+
},
53+
54+
install: function () {
55+
this.installDependencies();
56+
}
57+
});

generators/app/templates/_bower.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "package",
3+
"version": "0.0.0",
4+
"dependencies": {}
5+
}
6+
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "package",
3+
"version": "0.0.0",
4+
"dependencies": {}
5+
}

generators/app/templates/editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

generators/app/templates/jshintrc

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"node": true,
3+
"esnext": true,
4+
"bitwise": true,
5+
"camelcase": true,
6+
"curly": true,
7+
"eqeqeq": true,
8+
"immed": true,
9+
"indent": 2,
10+
"latedef": true,
11+
"newcap": true,
12+
"noarg": true,
13+
"quotmark": "single",
14+
"undef": true,
15+
"unused": true,
16+
"strict": true
17+
}

npm-debug.log

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
0 info it worked if it ends with ok
2+
1 verbose cli [ 'node', '/Users/scott.prue/.nvm/v0.10.38/bin/npm', 'publish' ]
3+
2 info using [email protected]
4+
3 info using [email protected]
5+
4 verbose publish [ '.' ]
6+
5 silly cache add args [ '.', null ]
7+
6 verbose cache add spec .
8+
7 silly cache add parsed spec { raw: '.',
9+
7 silly cache add scope: null,
10+
7 silly cache add name: null,
11+
7 silly cache add rawSpec: '.',
12+
7 silly cache add spec: '/Users/scott.prue/Dev/Code/kyper/generator-react-redux',
13+
7 silly cache add type: 'directory' }
14+
8 verbose addLocalDirectory /Users/scott.prue/.npm/generator-react-redux/0.0.1/package.tgz not in flight; packing
15+
9 verbose tar pack [ '/Users/scott.prue/.npm/generator-react-redux/0.0.1/package.tgz',
16+
9 verbose tar pack '/Users/scott.prue/Dev/Code/kyper/generator-react-redux' ]
17+
10 verbose tarball /Users/scott.prue/.npm/generator-react-redux/0.0.1/package.tgz
18+
11 verbose folder /Users/scott.prue/Dev/Code/kyper/generator-react-redux
19+
12 info prepublish [email protected]
20+
13 verbose addLocalTarball adding from inside cache /Users/scott.prue/.npm/generator-react-redux/0.0.1/package.tgz
21+
14 silly cache afterAdd [email protected]
22+
15 verbose afterAdd /Users/scott.prue/.npm/generator-react-redux/0.0.1/package/package.json not in flight; writing
23+
16 verbose afterAdd /Users/scott.prue/.npm/generator-react-redux/0.0.1/package/package.json written
24+
17 silly publish { name: 'generator-react-redux',
25+
17 silly publish version: '0.0.1',
26+
17 silly publish description: 'Yeoman generator for React/Redux projects.',
27+
17 silly publish license: 'MIT',
28+
17 silly publish main: 'generators/app/index.js',
29+
17 silly publish files: [ 'generators' ],
30+
17 silly publish repository:
31+
17 silly publish { type: 'git',
32+
17 silly publish url: 'git+https://github.com/kypertech/generator-react-redux.git' },
33+
17 silly publish author: { name: 'Scott', url: 'https://github.com/prescottprue' },
34+
17 silly publish scripts: { test: 'mocha' },
35+
17 silly publish keywords: [ 'yeoman-generator', 'kyper', 'react', 'redux', 'react-redux' ],
36+
17 silly publish dependencies:
37+
17 silly publish { 'yeoman-generator': '^0.21.1',
38+
17 silly publish chalk: '^1.0.0',
39+
17 silly publish yosay: '^1.0.2' },
40+
17 silly publish devDependencies: { mocha: '*' },
41+
17 silly publish readme: '# generator-react-redux\n\nHelps start and build projects using [React](https://facebook.github.io/react/) and [Redux](https://github.com/rackt/redux).\n\n> [Yeoman](http://yeoman.io) generator\n\n\n## Getting Started\n\n### What is Yeoman?\n\nTrick question. It\'s not a thing. It\'s this guy:\n\n![](http://i.imgur.com/JHaAlBJ.png)\n\nBasically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.\n\nNot every new computer comes with a Yeoman pre-installed. He lives in the [npm](https://npmjs.org) package repository. You only have to ask for him once, then he packs up and moves into your hard drive. *Make sure you clean up, he likes new and shiny things.*\n\n```bash\nnpm install -g yo\n```\n\n### Yeoman Generators\n\nYeoman travels light. He didn\'t pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.\n\nTo install generator-generator-kyper-react from npm, run:\n\n```bash\nnpm install -g generator-generator-kyper-react\n```\n\nFinally, initiate the generator:\n\n```bash\nyo generator kyper react\n```\n\n### Getting To Know Yeoman\n\nYeoman has a heart of gold. He\'s a person with feelings and opinions, but he\'s very easy to work with. If you think he\'s too opinionated, he can be easily convinced.\n\nIf you\'d like to get to know Yeoman better and meet some of his friends, [Grunt](http://gruntjs.com) and [Bower](http://bower.io), check out the complete [Getting Started Guide](https://github.com/yeoman/yeoman/wiki/Getting-Started).\n\n\n## License\n\nMIT\n',
42+
17 silly publish readmeFilename: 'README.md',
43+
17 silly publish gitHead: 'beaa7cf59ab34a35af1d5c31c79658e11a68d77a',
44+
17 silly publish bugs: { url: 'https://github.com/kypertech/generator-react-redux/issues' },
45+
17 silly publish homepage: 'https://github.com/kypertech/generator-react-redux#readme',
46+
17 silly publish _id: '[email protected]',
47+
17 silly publish _shasum: 'd197ad37e8d9cb0b76357e2a188673106e072e2d',
48+
17 silly publish _from: '.' }
49+
18 verbose getPublishConfig undefined
50+
19 silly mapToRegistry name generator-react-redux
51+
20 silly mapToRegistry using default registry
52+
21 silly mapToRegistry registry https://registry.npmjs.org/
53+
22 silly mapToRegistry uri https://registry.npmjs.org/generator-react-redux
54+
23 verbose publish registryBase https://registry.npmjs.org/
55+
24 silly publish uploading /Users/scott.prue/.npm/generator-react-redux/0.0.1/package.tgz
56+
25 verbose request uri https://registry.npmjs.org/generator-react-redux
57+
26 verbose request sending authorization for write operation
58+
27 info attempt registry request try #1 at 15:10:44
59+
28 verbose request using bearer token for auth
60+
29 verbose request id 9d6d7632d20e4cd2
61+
30 http request PUT https://registry.npmjs.org/generator-react-redux
62+
31 http 403 https://registry.npmjs.org/generator-react-redux
63+
32 verbose headers { 'content-type': 'application/json',
64+
32 verbose headers 'cache-control': 'max-age=60',
65+
32 verbose headers 'content-length': '113',
66+
32 verbose headers 'accept-ranges': 'bytes',
67+
32 verbose headers date: 'Thu, 05 Nov 2015 20:07:18 GMT',
68+
32 verbose headers via: '1.1 varnish',
69+
32 verbose headers connection: 'keep-alive',
70+
32 verbose headers 'x-served-by': 'cache-iad2123-IAD',
71+
32 verbose headers 'x-cache': 'MISS',
72+
32 verbose headers 'x-cache-hits': '0',
73+
32 verbose headers 'x-timer': 'S1446754037.746415,VS0,VE759' }
74+
33 verbose request invalidating /Users/scott.prue/.npm/registry.npmjs.org/generator-react-redux on PUT
75+
34 error publish Failed PUT 403
76+
35 verbose stack Error: You do not have permission to publish 'generator-react-redux'. Are you logged in as the correct user? : generator-react-redux
77+
35 verbose stack at makeError (/Users/scott.prue/.nvm/v0.10.38/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:263:12)
78+
35 verbose stack at CachingRegistryClient.<anonymous> (/Users/scott.prue/.nvm/v0.10.38/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:251:14)
79+
35 verbose stack at Request._callback (/Users/scott.prue/.nvm/v0.10.38/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:171:14)
80+
35 verbose stack at Request.self.callback (/Users/scott.prue/.nvm/v0.10.38/lib/node_modules/npm/node_modules/request/request.js:198:22)
81+
35 verbose stack at Request.emit (events.js:98:17)
82+
35 verbose stack at Request.<anonymous> (/Users/scott.prue/.nvm/v0.10.38/lib/node_modules/npm/node_modules/request/request.js:1073:14)
83+
35 verbose stack at Request.emit (events.js:117:20)
84+
35 verbose stack at IncomingMessage.<anonymous> (/Users/scott.prue/.nvm/v0.10.38/lib/node_modules/npm/node_modules/request/request.js:1019:12)
85+
35 verbose stack at IncomingMessage.emit (events.js:117:20)
86+
35 verbose stack at _stream_readable.js:944:16
87+
36 verbose statusCode 403
88+
37 verbose pkgid generator-react-redux
89+
38 verbose cwd /Users/scott.prue/Dev/Code/kyper/generator-react-redux
90+
39 error Darwin 14.3.0
91+
40 error argv "node" "/Users/scott.prue/.nvm/v0.10.38/bin/npm" "publish"
92+
41 error node v0.10.38
93+
42 error npm v2.14.2
94+
43 error code E403
95+
44 error You do not have permission to publish 'generator-react-redux'. Are you logged in as the correct user? : generator-react-redux
96+
45 error If you need help, you may report this error at:
97+
45 error <https://github.com/npm/npm/issues>
98+
46 verbose exit [ 1, true ]

package.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "generator-webpack-redux-react",
3+
"version": "0.0.1",
4+
"description": "Yeoman generator for React/Redux projects.",
5+
"license": "MIT",
6+
"main": "generators/app/index.js",
7+
"files": [
8+
"generators/app"
9+
],
10+
"repository": "https://github.com/kypertech/generator-react-redux",
11+
"author": {
12+
"name": "Scott",
13+
"email": "",
14+
"url": "https://github.com/prescottprue"
15+
},
16+
"scripts": {
17+
"test": "mocha"
18+
},
19+
"files": [
20+
"generators"
21+
],
22+
"keywords": [
23+
"yeoman-generator",
24+
"kyper",
25+
"webpack",
26+
"redux",
27+
"react",
28+
"react-redux"
29+
],
30+
"dependencies": {
31+
"yeoman-generator": "^0.21.1",
32+
"chalk": "^1.0.0",
33+
"yosay": "^1.0.2"
34+
},
35+
"devDependencies": {
36+
"mocha": "*"
37+
}
38+
}

test/test-app.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'use strict';
2+
3+
var path = require('path');
4+
var assert = require('yeoman-generator').assert;
5+
var helpers = require('yeoman-generator').test;
6+
var os = require('os');
7+
8+
describe('generator kyper react:app', function () {
9+
before(function (done) {
10+
helpers.run(path.join(__dirname, '../generators/app'))
11+
.withOptions({ skipInstall: true })
12+
.withPrompts({ someOption: true })
13+
.on('end', done);
14+
});
15+
16+
it('creates files', function () {
17+
assert.file([
18+
'bower.json',
19+
'package.json',
20+
'.editorconfig',
21+
'.jshintrc'
22+
]);
23+
});
24+
});

0 commit comments

Comments
 (0)