-
Notifications
You must be signed in to change notification settings - Fork 11
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
1 parent
55cad04
commit bce96fa
Showing
7 changed files
with
175 additions
and
0 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,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
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": false, | ||
"camelcase": true, | ||
"curly": false, | ||
"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,8 @@ | ||
contributing.md | ||
.editorconfig | ||
.gitattributes | ||
.jshintrc | ||
.npmignore | ||
test | ||
.travis.yml | ||
coverage/ |
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,107 @@ | ||
'use strict'; | ||
var generators = require('yeoman-generator'); | ||
|
||
var MyBase = generators.Base.extend({ | ||
|
||
// TODO | ||
// [X] initializing | ||
// [ ] prompting | ||
// [ ] configuring | ||
// [ ] default | ||
// [ ] writing | ||
// [ ] conflicts | ||
// [ ] install | ||
// [ ] end | ||
|
||
init: function () { | ||
console.log('Welcome to SMACSS!'); | ||
}, | ||
|
||
prompting: function () { | ||
var done = this.async(); | ||
|
||
var prompts = [{ | ||
name: 'appname', | ||
message: 'What would you like to name your app/site?', | ||
default: 'New Project' | ||
},{ | ||
name: 'apptype', | ||
message: 'Kind of app/site you are trying to build?', | ||
type: 'list', | ||
choices:[{ | ||
name: 'Static HTML', | ||
value: 'includeStaticApp', | ||
checked: false | ||
},{ | ||
name: 'Angular App', | ||
value: 'includeAngularApp', | ||
checked: false | ||
},{ | ||
name: 'Ember App', | ||
value: 'includeEmberApp', | ||
checked: false | ||
},{ | ||
name: 'Mobile App', | ||
value: 'includeMobileApp', | ||
checked: false | ||
}], | ||
default: 1 // default : this.appname // Default to current folder name | ||
},{ | ||
name: 'appfeatures', | ||
message: 'How about some additional features', | ||
type: 'checkbox', | ||
choices:[{ | ||
name: 'Modernizr', | ||
value: 'includeModernizr', | ||
checked: false | ||
},{ | ||
name: 'jQuery', | ||
value: 'includeQuery', | ||
checked: false | ||
},{ | ||
name: 'Respond', | ||
value: 'includeRespond', | ||
checked: false | ||
}] | ||
}]; | ||
|
||
this.prompt(prompts, function (props) { | ||
|
||
var appName = props.appname; | ||
var appType = props.apptype; | ||
var appFeatures = props.appfeatures; | ||
|
||
this.log("=============================== Creating project with following details ===============================") | ||
this.log('App Name: ' + appName); | ||
this.log('App Type: ' + appType); | ||
this.log('App Features: ' + appFeatures); | ||
|
||
done(); | ||
}.bind(this)); | ||
}, | ||
|
||
constructor: function () { | ||
generators.Base.apply(this, arguments); | ||
|
||
// This method adds support for a `--coffee` flag | ||
this.option('coffee'); | ||
// And you can then access it later on this way; e.g. | ||
this.scriptSuffix = (this.options.coffee ? ".coffee": ".js"); | ||
}, | ||
|
||
helper: function () { | ||
console.log('won\'t be called'); | ||
}, | ||
errorHanding: function () { | ||
this.log('Something has gone wrong!'); | ||
} | ||
}); | ||
|
||
module.exports = MyBase.extend({ | ||
exec: function () { | ||
//this.prompt("What?"); | ||
this.init(); | ||
|
||
this.prompting(); | ||
} | ||
}); |
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,28 @@ | ||
{ | ||
"name": "generator-smacss", | ||
"version": "0.0.1", | ||
"description": "Perfectionist Frontend Generator", | ||
"author": "", | ||
"license": "ISC", | ||
"keywords": [ | ||
"yeoman-generator", | ||
"scaffold", | ||
"framework", | ||
"mvc", | ||
"smacss", | ||
"web-generator" | ||
], | ||
"homepage": "https://github.com/yeoman/generator-backbone", | ||
"bugs": "https://github.com/yeoman/generator-backbone/issues", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"dependencies": { | ||
"yeoman-generator": "^0.17.3" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "" | ||
}, | ||
"main": "index.js" | ||
} |