Comments (10)
So everything seems to be working as expected now. Thanks for all your help really appreciate it. Thought it might be beneficial for newer users, like myself, to have a bit more granular getting started guide. Helps make new tools and such much more approachable for the first time and potentially avoid rudimentary questions for you.
Getting Started
$ sails new testProject
$ cd testProject
$ npm install machinepack-prompts machinepack-sailsgulpify --save
$ npm install
$ node node_modules/machinepack-sailsgulpify/templates/toggleEngine.js
- At prompt enter
gulpifysails
thenyes
- ---GulipfySails runs and sets up project to run Gulp (can take a few minutes)---
$ node node_modules/machinepack-sailsgulpify/templates/toggleEngine.js
(again)- At prompt enter
gulp
Mac/Linux
$ sails lift
Windows
- delete
./node_modules
created by sails $ npm install
$ sails lift
from machinepack-sailsgulpify.
Hi wsfuller,
with this machinepack all that is needed is to
- sails new
- cd into new project
- npm install machinepack-prompts machinepack-sailsgulpify
- npm install
- node node_modules/machinepack-sailsgulpify/templates/toggleEngine.js
I haven't had a chance to work on hooking into the sails new command yet, since sails uses an rc file for module injection (which is basically a json file).
from machinepack-sailsgulpify.
Thanks for the reply. However still a bit confused on how this is supposed to be hooked together.
- sails new testProject && cd testProject
- npm install machinepack-prompts machinepack-sailsgulpify --save
- npm install
- looked inside node_modules > machine-pack-sailsgulpify > templates > toggleEngine.js
I see in the toggleEngine.js message: "For first time configuration, enter gulpifysails. To switch engines, please enter gulp for gulp engine or grunt for grunt engine.",
That's where I'm stuck. Is there something that needs to be done to the .sailsrc file?
.sailsrc (I've tried configuring this a ton of different ways then run sails lift
and never see a prompt to switch task runners
{
"generators": {
"modules": {
"node": "gulpifysails"
}
}
}
Is this the correct way but doing something wrong or am I completely missing the point. Was on Sails Concepts but there are no working examples either on how to hook code other than the RC examples which I think I'm doing correctly like any other package.json or bower.json file.
from machinepack-sailsgulpify.
ok, so after the machinepack is installed, you need to run node node_modules/machinepack-sailsgulpify/templates/toggleEngine.js in the console in the project root directory. When prompted, enter gulpifysails and it will begin to configure sails by adding everything needed for gulp. Once configuration is complete, run node node_modules/machinepack-sailsgulpify/templates/toggleEngine.js again and enter gulp to use gulp or grunt to use grunt. .sailsrc is not used with this machinepack.
from machinepack-sailsgulpify.
Thank you for clarifying the installation process. Not sure if further setup is required but this is where I'm at now
$ sails new testProject
$ cd testProject
$ npm install machinepack-prompts machinepack-sailsgulpify --save
$ npm install
$ node node_modules/machinepack-sailsgulpify/templates/toggleEngine.js
- At prompt enter
gulpifysails
thenyes
- ---GulipfySails runs and sets up project to run Gulp (can take a few minutes)---
$ node node_modules/machinepack-sailsgulpify/templates/toggleEngine.js
(again)- At prompt enter
gulp
$ sails lift
So after doing the above the installation takes place and looks like everything is good to go. However, running sails lift
get an error:
error: Gulp :: module.js:327
throw err;
^
Error: Cannot find module 'C:\Users\username\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
Get the default "server lifted" message but no server is running.
Now running gulp
get another error [11:14:53] 'jst:dev' errored after 15 ms
| Error: Cannot find module 'gulp-template-compile' from 'C:\Users\username\Desktop\testProject'
than receive subsequential errors for the rest of the Gulp Tasks
from machinepack-sailsgulpify.
ok, you need to npm install -g gulp
from machinepack-sailsgulpify.
what system areyou using? windows, mac, linux?
from machinepack-sailsgulpify.
I have Gulp installed for all my other projects using CLI version 1.2.2 and Local version 3.9.1. Running Windows 10 (not by choice).
from machinepack-sailsgulpify.
Ok so doing another global install of Gulp fixed the problem. Not sure why that's the case when I've been using gulp for the past several weeks on this machine.
EDIT
npm -g gulp
gulp -v
- Both Local and CLI versions are 3.9.1 instead of stated versions above
from machinepack-sailsgulpify.
on windows you will need to make sure that after creating the project you delete the node modules folder created by sails. windows doesn't like the linkage that sails creates. So, when you create a new project on windows, delete the node modules folder and do an npm install to get the unlinked modules.
from machinepack-sailsgulpify.
Related Issues (10)
- Documentation clarity HOT 2
- refactor machinepack for updating sails HOT 1
- change since 0.12.3 HOT 1
- custom tasks deleted HOT 1
- This machinepack does not remove the need for grunt entirely. HOT 4
- [Feature request] A way to modify `sails new` behaviour
- Livereload causes crash on any change HOT 10
- Sass task HOT 2
- Error: server.changed is not a function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from machinepack-sailsgulpify.