Code Monkey home page Code Monkey logo

oyanachan's Introduction

OyanaChan

The quick & easy way to compile basic website (js, scss, imgs, svg)

OyanaChan is a rebuild version of gulp-oyana.

OyanaChan is made for:

  • Node > 12
  • NPM > 6
  • Gulp > 4

If you have to used older teck please consider used gulp-oyana insted.

How to install

If you havent gulp.

  • Unix: sudo npm install gulp -g.
  • Windows: npm install gulp -g.

If you havent create your package.json yet.

  • npm init

Install

  • npm install oyanachan --save-dev.

How to use

In your gulpfile.js.

Use only the options you need!

	const oyana = require('oyanachan');

	oyana({
		'jsMinPath' : './public/js',
		'jsPath' : './resources/js',
		'jsName' : 'main.min',
		'cssPath' : './public/css',
		'scssPath' : './resources/scss',
		'outputStyle' : 'compressed',
		'imgMinPath' : './public/img',
		'imgPath' : './resources/img',
		'htmlMinPath' : './htmlMin',
		'htmlPath' : './html',
		'htmlPages' : {
			'index.html':[
				'html/head.inc.html',
				'html/header.inc.html',
				'html/home.inc.html',
				'html/footer.inc.html',
				'html/foot.inc.html'
			]
		},
		'proxyPath' : 'http://localhost'
	});

If you dont need js complation remove {jsMinPath, jsPath, jsName}. If you dont need scss complation remove {scssPath, cssPath, outputStyle}. If you dont need images complation remove {imgMinPath, imgPath}. If you dont need browser sync remove {proxyPath}. If you dont need browser sync remove {proxyPath}.

Command line:

Command Effect Alias
gulp js-compile Compile all js from jsPath to jsMinPath. gulp js, gulp jquery, gulp script
gulp js-compile-silent Compile all js from jsPath to jsMinPath without notification.
gulp scss-compile Compile all scss from scssPath to cssPath in outputStyle. gulp scss, gulp sass, gulp compass,
gulp scss-compile-silent Compile all scss from scssPath to cssPath in outputStyle without notification.
gulp html-compile Compile all html, svg, html, plain text from htmlPath to htmlMinPath you have to customise the hiercht throuw htmlPages.
gulp html-compile-silent Compile all html, svg, html, plain text from htmlPath to htmlMinPath you have to customise the hiercht throuw htmlPages without notification.
gulp img-minimize Minimize all Images from imgPath to imgMinPath. gulp img, gulp image, gulp images, gulp minimize
gulp img-minimize-silent Minimize all Images from imgPath to imgMinPath without notification.
gulp watch Watch all scss, js, img and compile on update.
gulp watch-silent Watch all scss, js, img and compile on update without notification.
gulp oyana Compile all files then watch it. gulp gulp oyanachan
gulp oyana-silent Compile all files then watch it without notification. gulp *

Any issue with SCSS compilation?

Gulp SASS common issues-and their fixes

oyanachan's People

Contributors

golgarud avatar trenyture avatar jiedara avatar noumie avatar

Stargazers

Vincent Lalanne avatar  avatar  avatar  avatar  avatar  avatar

Watchers

James Cloos avatar Pierre Prézelin avatar  avatar

Forkers

heralight

oyanachan's Issues

Gulp watch error : ENOSPC

This is not a gulp-oyana specific issue, but it can be mentioned somewhere.

Due to the large set of file manipulated by the watch function, apparently, an overload is possible for Unix based system.

The error show up like this :

Error: watch /var/.../resources/scss/ ENOSPC
    at exports._errnoException (util.js:870:11)
    at FSWatcher.start (fs.js:1234:19)
    at Object.fs.watch (fs.js:1262:11)
    at Gaze._watchDir (/var/www/html/qusto/referrals/node_modules/gaze/lib/gaze.js:289:30)
    at /var/www/html/qusto/referrals/node_modules/gaze/lib/gaze.js:358:10
    at iterate (/var/www/html/qusto/referrals/node_modules/gaze/lib/helper.js:52:5)
    at Object.forEachSeries (/var/www/html/qusto/referrals/node_modules/gaze/lib/helper.js:66:3)
    at Gaze._initWatched (/var/www/html/qusto/referrals/node_modules/gaze/lib/gaze.js:354:10)
    at Gaze.add (/var/www/html/qusto/referrals/node_modules/gaze/lib/gaze.js:177:8)
    at new Gaze (/var/www/html/qusto/referrals/node_modules/gaze/lib/gaze.js:74:10)

It can be solved by running this command :
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

SOURCE

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.