@coffeekraken/compile-server
Provide a simple rest API for compiling js, coffee, sass, scss, etc... files through a node server
Last updated 5 months ago by olivierbossel .
MIT · Original npm · Tarball · package.json
$ cnpm install @coffeekraken/compile-server 
SYNC missed versions from official npm registry.

Coffeekraken Compile Server

npm npm npm

Provide a simple rest API for compiling js, coffee, sass, scss, etc... files through a node server

Table of content

  1. Install
  2. Get Started
  3. Settings
  4. Documentation
  5. Coffeekraken

Install

npm install @coffeekraken/compile-server --save-dev

Get Started

Define a script inside your package.json to launch the compile server.

{
	"scripts": {
		"compile-server": "coffeekraken-compile-server [options]"
	}
}

Launch your compile server:

npm run compile-server

Import the API into your javascript file like so:

import compileServer from '@coffeekraken/compile-server'

// make a js compilation
const myCoolJsCode = `
	console.log("hello world")
`
compileServer.compile(myCoolJsCode, 'js').then((compiledCode) => {
 	// do something here...
});

// make a scss compilation
const myCoolScssCode = `
	.hello {
		.world {
			background: red;
		}
	}
`
compileServer.compile(myCoolScssCode, 'scss').then((compiledCode) => {
 	// do something here...
});

Settings

To set the settings of your compile server, simply create a compile-server.config.js file at the root of your project like so:

module.exports = {

	// server port
	port : 4000,

	// secret used to decrypt paths etc... sended by the client
	secret : null

}

Coffeekraken

We are a young collective of front-end creative developers with one goal in mind. Build tools to make every team working day life better. This is our first and only concern. All our tools are build around that purpose. All what we provide are some cool tools that you can use the way you want. These tools features cover a large scope of the front-end workflow (styleguide generation, colors/fonts management, etc...). You can use only the parts that you need and let the rest aside...

Coffeekraken

Current Tags

  • 0.0.5                                ...           latest (5 months ago)

5 Versions

  • 0.0.5                                ...           5 months ago
  • 0.0.4                                ...           5 months ago
  • 0.0.1                                ...           6 months ago
  • 0.0.3                                ...           5 months ago
  • 0.0.2                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 5
This Month 5
Last Day 5
Last Week 0
Last Month 5
Dependencies (17)
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |