This repository has been archived by the owner on Jul 25, 2023. It is now read-only.
forked from jolicode/generator-joli-symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
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
13 changed files
with
234 additions
and
3 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,12 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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 @@ | ||
* text=auto |
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 |
---|---|---|
|
@@ -4,3 +4,5 @@ bower_components/ | |
|
||
build/ | ||
dist/ | ||
.idea/ | ||
temp/ |
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,6 @@ | ||
language: node_js | ||
node_js: | ||
- '0.10' | ||
before_install: | ||
- currentfolder=${PWD##*/} | ||
- if [ "$currentfolder" != 'generator-jolistarter' ]; then cd .. && eval "mv $currentfolder generator-jolistarter" && cd generator-jolistarter; fi |
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 @@ | ||
{} |
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,4 +1,47 @@ | ||
generator-jolistarter | ||
===================== | ||
# generator-jolistarter [![Build Status](https://secure.travis-ci.org/lbrunet/generator-jolistarter.png?branch=master)](https://travis-ci.org/lbrunet/generator-jolistarter) | ||
|
||
Scaffolds a standard Symfony2 application with Yeoman | ||
> [Yeoman](http://yeoman.io) generator | ||
|
||
## Getting Started | ||
|
||
### What is Yeoman? | ||
|
||
Trick question. It's not a thing. It's this guy: | ||
|
||
![](http://i.imgur.com/JHaAlBJ.png) | ||
|
||
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. | ||
|
||
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.* | ||
|
||
```bash | ||
npm install -g yo | ||
``` | ||
|
||
### Yeoman Generators | ||
|
||
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. | ||
|
||
To install generator-jolistarter from npm, run: | ||
|
||
```bash | ||
npm install -g generator-jolistarter | ||
``` | ||
|
||
Finally, initiate the generator: | ||
|
||
```bash | ||
yo jolistarter | ||
``` | ||
|
||
### Getting To Know Yeoman | ||
|
||
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. | ||
|
||
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). | ||
|
||
|
||
## License | ||
|
||
MIT |
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,62 @@ | ||
'use strict'; | ||
var yeoman = require('yeoman-generator'); | ||
var chalk = require('chalk'); | ||
var yosay = require('yosay'); | ||
|
||
module.exports = yeoman.generators.Base.extend({ | ||
initializing: function () { | ||
this.pkg = require('../package.json'); | ||
}, | ||
|
||
prompting: function () { | ||
var done = this.async(); | ||
|
||
// Have Yeoman greet the user. | ||
this.log(yosay( | ||
'Welcome to the groundbreaking' + chalk.red('Jolistarter') + ' generator!' | ||
)); | ||
|
||
var prompts = [{ | ||
type: 'confirm', | ||
name: 'someOption', | ||
message: 'Would you like to enable this option?', | ||
default: true | ||
}]; | ||
|
||
this.prompt(prompts, function (props) { | ||
this.someOption = props.someOption; | ||
|
||
done(); | ||
}.bind(this)); | ||
}, | ||
|
||
writing: { | ||
app: function () { | ||
this.fs.copy( | ||
this.templatePath('_package.json'), | ||
this.destinationPath('package.json') | ||
); | ||
this.fs.copy( | ||
this.templatePath('_bower.json'), | ||
this.destinationPath('bower.json') | ||
); | ||
}, | ||
|
||
projectfiles: function () { | ||
this.fs.copy( | ||
this.templatePath('editorconfig'), | ||
this.destinationPath('.editorconfig') | ||
); | ||
this.fs.copy( | ||
this.templatePath('jshintrc'), | ||
this.destinationPath('.jshintrc') | ||
); | ||
} | ||
}, | ||
|
||
install: function () { | ||
this.installDependencies({ | ||
skipInstall: this.options['skip-install'] | ||
}); | ||
} | ||
}); |
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,6 @@ | ||
{ | ||
"name": "package", | ||
"version": "0.0.0", | ||
"dependencies": {} | ||
} | ||
|
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 @@ | ||
{ | ||
"name": "package", | ||
"version": "0.0.0", | ||
"dependencies": {} | ||
} |
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,12 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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 @@ | ||
{ | ||
"node": true, | ||
"esnext": true, | ||
"bitwise": true, | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"indent": 2, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"quotmark": "single", | ||
"undef": true, | ||
"unused": true, | ||
"strict": 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "generator-jolistarter", | ||
"version": "0.0.1", | ||
"description": "Scaffolds a standard Symfony2 application with Yeoman", | ||
"license": "MIT", | ||
"main": "app/index.js", | ||
"repository": "lbrunet/generator-jolistarter", | ||
"author": { | ||
"name": "Laurent Brunet", | ||
"email": "", | ||
"url": "/~https://github.com/lbrunet" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha" | ||
}, | ||
"files": [ | ||
"app" | ||
], | ||
"keywords": [ | ||
"yeoman-generator" | ||
], | ||
"dependencies": { | ||
"yeoman-generator": "^0.18.0", | ||
"chalk": "^0.5.0", | ||
"yosay": "^0.3.0", | ||
"js-yaml": "^3.2.3" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*" | ||
}, | ||
"peerDependencies": { | ||
"yo": ">=1.0.0" | ||
} | ||
} |
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,27 @@ | ||
'use strict'; | ||
|
||
var path = require('path'); | ||
var assert = require('yeoman-generator').assert; | ||
var helpers = require('yeoman-generator').test; | ||
var os = require('os'); | ||
|
||
describe('jolistarter:app', function () { | ||
before(function (done) { | ||
helpers.run(path.join(__dirname, '../app')) | ||
.inDir(path.join(os.tmpdir(), './temp-test')) | ||
.withOptions({ 'skip-install': true }) | ||
.withPrompt({ | ||
someOption: true | ||
}) | ||
.on('end', done); | ||
}); | ||
|
||
it('creates files', function () { | ||
assert.file([ | ||
'bower.json', | ||
'package.json', | ||
'.editorconfig', | ||
'.jshintrc' | ||
]); | ||
}); | ||
}); |