fuelfrontend / generator-smacss Goto Github PK
View Code? Open in Web Editor NEWPerfectionist generator that scaffolds out different types of Frontend apps
Home Page: https://www.npmjs.com/package/generator-smacss
License: MIT License
Perfectionist generator that scaffolds out different types of Frontend apps
Home Page: https://www.npmjs.com/package/generator-smacss
License: MIT License
Please create default folder structure like (controller, models,directives...etc) while creating angular app.
After the prompts the generator is automatically installing the dependencies.
Run the command gulp
to fire the server also to reduce the user interaction by one step.
While installing bower components user should use --save-dev to include in bower.js while concat process.
This needs to be communicate to the user in documentation clearly.
On dependency failing: Provide comments to install as admin
Even after running localhost server in different port, gulp throws error.
Steps to reproduce
But gulp server is working properly. Try it get rid of that message
Since smacss is continuously updated with new features and issue fixes. There is no option to show to user that smacss is updated to newer version. So user has to manually update using npm update generator-smcass. By using update-notifier we can notify user that a new update for available in the command line.
gulp-autoprefixer task to auto prefix vendor specific css properties
this is the problem i am getting while running gulp command in angular js app.
--------- Server started at http://localhost:3000 ------------------------
[22:26:05] Webserver started at http://localhost:3000
events.js:72
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer as oncomplete
It would be great if we can add a readme file for installation and other details of application user is creating.
Create a new app type for scaffolding React application
Lets break down the gulp file - https://github.com/gulpjs/gulp/blob/master/docs/recipes/split-tasks-across-multiple-files.md
In this way we will easily be able to include / exclude gulp tasks based on multiple factors.
Default index page of the scaffold app needs to hold the information about
While doing gulp prod in terminal, throws an error do minification of HTML files before gulp file include. I have fixed this issue in my latest PR.
Tried installing the FullPack option with jQuery and Modernizer, but am getting an error:
[16:20:27] Error: Cannot find module '../bower_components/modernizr/bower.json'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at addPackage (/Users/peterberwind/code/smacssFullpack/tasks/bower.js:45:16)
at /Users/peterberwind/code/smacssFullpack/tasks/bower.js:66:7
at Function._.each._.forEach (/Users/peterberwind/code/smacssFullpack/node_modules/underscore/underscore.js:158:9)
at Gulp.<anonymous> (/Users/peterberwind/code/smacssFullpack/tasks/bower.js:64:14)
at module.exports (/Users/peterberwind/code/smacssFullpack/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/peterberwind/code/smacssFullpack/node_modules/orchestrator/index.js:273:3)
Error running task sequence: { task: 'bundle-libraries',
message: 'bundle-libraries catch',
duration: 0.000709324,
hrDuration: [ 0, 709324 ],
err:
{ Error: Cannot find module '../bower_components/modernizr/bower.json'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at addPackage (/Users/peterberwind/code/smacssFullpack/tasks/bower.js:45:16)
at /Users/peterberwind/code/smacssFullpack/tasks/bower.js:66:7
at Function._.each._.forEach (/Users/peterberwind/code/smacssFullpack/node_modules/underscore/underscore.js:158:9)
at Gulp.<anonymous> (/Users/peterberwind/code/smacssFullpack/tasks/bower.js:64:14)
at module.exports (/Users/peterberwind/code/smacssFullpack/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/peterberwind/code/smacssFullpack/node_modules/orchestrator/index.js:273:3) code: 'MODULE_NOT_FOUND' }
}
I tried running sudo npm install
and sudo bower install
Does anyone know what might be causing this issue?
The gulp tasks directory should be outside the app directory.
The app directory should contain code which is necessary to build the dist directory. Even if the developer uses some other build system like grunt, we should be able to pass him the app directory and the developer should be able to continue the development.
Hi. Thanks for your time and work on the smacss generator.
I'm new to web development but would realllly like to use this generator but am not sure if I should post this problem as an issue on github or not.
josh@josh-700-310xt:~/Desktop/testy/testThisBitch$ gulp
[21:52:10] Warning: gulp version mismatch:
[21:52:10] Global gulp is 3.9.0
[21:52:10] Local gulp is 3.8.11
/home/josh/Desktop/testy/testThisBitch/node_modules/node-sass/lib/index.js:22
throw new Error('libsass
bindings not found. Try reinstalling node-sass
?');
^
Error: libsass
bindings not found. Try reinstalling node-sass
?
at getBinding (/home/josh/Desktop/testy/testThisBitch/node_modules/node-sass/lib/index.js:22:11)
at Object. (/home/josh/Desktop/testy/testThisBitch/node_modules/node-sass/lib/index.js:188:23)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/home/josh/Desktop/testy/testThisBitch/node_modules/gulp-sass/index.js:3:17)
at Module._compile (module.js:425:26)
... Is this normal behavior?
Do I have to install and use gulp 3.8.11 globally or is there something else?
Should I create a new issue for this?
Generator follows a common directory structure throughout all app types. This needs to be followed in Restify App as well.
Current structure
├── controllers
│ └── userController.js
├── models
│ └── userSchema.js
├── route.js
├── app.js
├── config.json
├── db.js
├── node_modules
├── package.json
├── gulpfile.js
├── .gitattributes
└── .gitignore
Proposed structure
├── app
│ ├── controllers
│ │ └── userController.js
│ ├── models
│ │ └── userSchema.js
│ └── route.js
│ └── app.js
│ └── config.json
│ └── db.js
├── node_modules
├── package.json
├── gulpfile.js
├── .gitattributes
└── .gitignore
Users may want to create quick applications sometimes, for one of the main reason
In that situation its better to opt for bootstrap.
Generator should give an option to select bootstrap for applications.
Since the meta tag for viewport is not present, media query won't work in mobile and tablets.
Integrate some testing frameworks for TDD
Suggestions
Mocha - http://mochajs.org/
Chai - http://chaijs.com/
This generator is not listed in the yeoman.io site
We will need a Gulp task that parse the bower components files and add main files to bower.js
in the right order (dependencies first and then the library itself after) to avoid undefined error while running the application.
Tip: Each Bower library has its own bower.json file, which specifies the dependencies of that library.
JS lint is validating library files also. Create jslint config file and exclude library folder
When i try to do gulp,
Image folder is not coming in the build folder.
Please check this and let me know.
Current: If port is already occupied, gulp fails to start the server.
Expected: It should start assign new port and run server in that port.
Hi @logeshpaul
Thinking about scalability, I would prefer separate directories for each components (base, layout, master etc.), rather than a single file.
Even modules can have different directories, for which we can provide with sub generators.
End user app has lot of dependencies which make the dependency installation heavy and taking quite long.
Suggested Solution
lite
or full_packed
or custom
lite
- should only have limited and super necessary dependenciesfull_packed
- should have all necessary dependenciescustom
- shows a list of useful dependencies which user can select from.Let me know if you have a better suggestion.
It would be great to have ng-annotate task for angular apps.
File: app/index.js
Complex method copyMainFiles (complexity = 18)
https://codeclimate.com/github/FuelFrontend/generator-smacss/app/index.js
Quick commands
Example type in smacss: controller controllername --options
in terminal and it should
Lets say we already have git repo and we need to create a project in the root of the cloned repo. There is not option to it add in same directory.
There should be flag to create project in current directory. Like below
yo smacss current
smacssGenerator
Currently we are using gulp webserver
for local server and to perform live reload feature. It doesn't comes with cool features like Sync: scroll, user input & connected devices.
Browser sync does comes along with those features. So why don't we directly opt for browser sync instead of old school gulp-webserver
Write automation and deployment helper methods for complete workflow
Suggestion
Shipit - https://github.com/shipitjs/shipit
Through bower-install gulp task, libraries like bootstrap is not concating css and js file due to bower.json not present in bower_components/bootstrap
Bootstrap and some other libraries in bower contains .bower.json file instead bower.json. In bower task we have check this also
File: app/templates/_gulpfile.js
Replace smacss-in-action static image with quick demo gif for better understanding of the plugin.
Gif should show
Readme file has to show app structure for different type of type for the user to understand how the generator will scaffold the folders
Example
├── app
│ ├── bower_components
│ │ ├── jquery
│ │ └── modernizr
│ ├── images
│ ├── js
│ │ └── lib
│ │ │ └── third-party-files
│ │ └── main.js
│ ├── css
│ │ └── main.css
│ ├── scss
│ │ └── lib
│ ├── favicon.ico
│ ├── index.html
│ └── robots.txt
├── dist
│ ├── scripts
│ └── styles
├── node_modules
├── test
├── .bowerrc
├── .gitignore
├── bower.json
├── gulpfile.js
└── package.json
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.