Git Product home page Git Product logo

sails-react-webpack's Introduction

Sails + React + Webpack CLI

A CLI for scaffolding a Sails + React boilerplate.

Includes


Install

Install the module globally:

$ npm install -g sails-react-webpack

Generating a New Project

To generate a new project, run:

sails-react-webpack [project-name]

cd [project-name]

npm install

// or

yarn

Run (development)

npm start will run all processes in the Procfile. It will start both Sails AND the Webpack Dev Server simultaneously.

npm start

To view your app, go to http://localhost:3000 in your browser.


Run (Production)

Webpack builds the bundle files on postinstall and sails is lifted the same way it's always lifted in production:

sails lift --prod

You can run this script manually with npm run dist.


Generate Components

Use react-component-gen to generate new components on the fly.

sails-react-webpack's People

Contributors

adelhaz avatar markmur avatar medemi68 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sails-react-webpack's Issues

cannot create with node v7

The package is using node 5.8.0 and I am using node 7.x.x
Why using node 5.8 and not node higher the 5.8?

cannot access any other controller route

if you do something like this

'GET /': {
    controller: 'AppController',
    action: 'index',
    skipAssets: true,
  },

  'GET /test': { controller: 'AppController', action: 'test', skipAssets: true },

instead of

'GET /*': {
    controller: 'AppController',
    action: 'index',
    skipAssets: true,
  },

we can use the controllers for api calls as well rendering pages

Sails sockets fail to inititialize

Having an easy time with the scaffolding so far with one exception. The sails.io.js dependency is failing to load making websockets unavailable.

I was able to easily reproduce this from source code with the following:

  1. git clone ...
  2. cd sails-react-webpack
  3. npm install
  4. nf start
  5. open browser and navigate to localhost:3000
  6. open dev-tools/console
  7. observe that sails.io.js has not been loaded and the iconic sail boat message is missing

Please let me know if there's anything I can do to help resolve this.

Upgrade React to v16

Hi,

It's possible to upgrade to React 16 ?

I tried to modify the Package.json file but it does not work.

Thanks.

Not working with Webpack 4.0

I tried setting up a project but it seems that the webpack configuration is not working for 4.0.0.
I am not a webpack expert, so I struggled and couldn't make it work.

Have anyone manged to do it?

npm run fails

Seems like a weird error running npm start

> [email protected] start C:\Users\Felo\Desktop\sailsreactwebpack
> nf start --wrap

[WARN] No ENV file found
[OKAY] Wrapping display Output to NaN Columns
C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\foreman\lib\console.js:11
    return wrap(log.substr(length), length, res);
                    ^

RangeError: Maximum call stack size exceeded
    at String.substr (native)
    at wrap (C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\foreman\lib\console.js:11:21)
    at wrap (C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\foreman\lib\console.js:11:12)
    at wrap (C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\foreman\lib\console.js:11:12)
    at wrap (C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\foreman\lib\console.js:11:12)
    at wrap (C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\foreman\lib\console.js:11:12)
    at wrap (C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\foreman\lib\console.js:11:12)
    at wrap (C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\foreman\lib\console.js:11:12)
    at wrap (C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\foreman\lib\console.js:11:12)
    at wrap (C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\foreman\lib\console.js:11:12)

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `nf start --wrap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'nf start --wrap'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sails-react-webpack package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     nf start --wrap
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sails-react-webpack
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sails-react-webpack
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Felo\Desktop\sailsreactwebpack\npm-debug.log

And debug.log is:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\Felo\Desktop\sailsreactwebpack\node_modules\.bin;C:\Users\Felo\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Felo\bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\app\Felo\product\12.1.0\dbhome_1\bin;C:\Program Files\Java\jdk1.8.0_121\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;D:\Programming\myPathPrograms\win;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\doxygen\bin;C:\MinGW\bin;C:\Program Files\nodejs;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\Git\cmd;C:\Program Files (x86)\Android SDK\tools;C:\Program Files (x86)\Android SDK\platform-tools;C:\ProgramData\chocolatey\bin;C:\Users\Felo\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.1;C:\MinGW\bin;C:\MinGW\bin;C:\Users\Felo\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
10 verbose lifecycle [email protected]~start: CWD: C:\Users\Felo\Desktop\sailsreactwebpack
11 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'nf start --wrap' ]
12 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `nf start --wrap`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:886:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd C:\Users\Felo\Desktop\sailsreactwebpack
17 error Windows_NT 10.0.14393
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 error node v6.10.2
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error [email protected] start: `nf start --wrap`
22 error Exit status 1
23 error Failed at the [email protected] start script 'nf start --wrap'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the sails-react-webpack package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     nf start --wrap
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs sails-react-webpack
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls sails-react-webpack
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

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.