This package has been deprecated

Author message:

No longer in use nor maintained

generator-np-laravel

2.4.0 • Public • Published

NoProtocol Laravel Generator

The NoProtocol Laravel Generator creates a project scaffolding for a Laravel project based on NoProtocol's best practices. This includes such features as:

  • Complete Gulp build file (based on our own) gulp-noprotocol library
  • Automatic robots.txt based on environment setting
  • Pre-defined SASS & JS structure

See the features list to see them all.

Installation

If you don't already have it installed, install Yeoman

npm install -g yo

Install the generator

npm install -g generator-np-laravel

Using the generator

Make a new directory, and cd into it:

mkdir my-new-project && cd $_

Run yo np-laravel or simply yo and select the Np Laravel generator.

Options:

  • --quick Skip interaction and install app with defaults* and setup the database, create Git repository and install all Composer/NPM/Bower dependencies
  • --skipdbsetup Skip the database setup
  • --skipdependencies Skip installation of all the Composer/NPM/Bower dependencies
  • --force Force installation even if the directory isn't empty

* Defaults are as follows:

  • Projectname: dirname
  • Project version: 1.0.0
  • Laravel version: 5.2.24
  • Setup database: yes
  • Database credentials: root/root
  • Database name: projectname_ddb
  • Setup git repository: yes

You can also see these options by running yo np-laravel --help.

When the generator is finished, run gulp and you're done.

Features:

Laravel

Laravel v5.2.24, v5.2.23, v5.2.15, v5.2.0, 5.1.11, 5.1.4, 5.1 or master. See the Laravel site for the various versions.

Gulp

Build the app using Gulp and our own gulp-noprotocol (which takes care of bundling files, running sass etc).

Place all the app JS files outside the webroot in resources/js. The gulp process will bundle them into app.min.js in the public/build/js folder. If needed, extra JS libs can be placed anywhere and added to the gulp bundle-libs task. These will be bundled into libs.min.js

Place all the Sass files outside the webroot in resources/sass. The gulp process will bundle them into app.js in the public/build/js folder.

The gulp watch task also activates Livereload which is set to reload on changes to .js and .css files.

Robots.txt

Due to repeated incidents in which staging server still allowed crawlers to access everything, the generator comes with RobotsController.php. On any Laravel environment other the production the output will be Disallow: *.

.htaccess

The .htaccess file has been augmented with several settings taken from the HTML5 boilerplate such as media types, security settings, gzip etc. The option to force HTTPS for one or more domains has also been added. See the file for more info.

Splash page

A NoProtocol splash page on the index :)

Package Sidebar

Install

npm i generator-np-laravel

Weekly Downloads

0

Version

2.4.0

License

MIT

Last publish

Collaborators

  • bfanger
  • havelaer
  • hyra
  • verschuur