Giter VIP home page Giter VIP logo

Comments (10)

wsfuller avatar wsfuller commented on August 20, 2024 2

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

  1. $ sails new testProject
  2. $ cd testProject
  3. $ npm install machinepack-prompts machinepack-sailsgulpify --save
  4. $ npm install
  5. $ node node_modules/machinepack-sailsgulpify/templates/toggleEngine.js
  6. At prompt enter gulpifysails then yes
  7. ---GulipfySails runs and sets up project to run Gulp (can take a few minutes)---
  8. $ node node_modules/machinepack-sailsgulpify/templates/toggleEngine.js (again)
  9. At prompt enter gulp

Mac/Linux

  • $ sails lift

Windows

  • delete ./node_modules created by sails
  • $ npm install
  • $ sails lift

from machinepack-sailsgulpify.

Karnith avatar Karnith commented on August 20, 2024

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.

wsfuller avatar wsfuller commented on August 20, 2024

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.

Karnith avatar Karnith commented on August 20, 2024

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.

wsfuller avatar wsfuller commented on August 20, 2024

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 then yes
  • ---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.

Karnith avatar Karnith commented on August 20, 2024

ok, you need to npm install -g gulp

from machinepack-sailsgulpify.

Karnith avatar Karnith commented on August 20, 2024

what system areyou using? windows, mac, linux?

from machinepack-sailsgulpify.

wsfuller avatar wsfuller commented on August 20, 2024

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.

wsfuller avatar wsfuller commented on August 20, 2024

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.

Karnith avatar Karnith commented on August 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.