1.0.6 • Published 9 years ago

stone v1.0.6

Weekly downloads
5
License
-
Repository
github
Last release
9 years ago

Stone

Stone is a unique static server that can be used during development, deployment and runtime.

Example

stone = new Stone()
stone.start()

# If you go to `http://localhost:8888/myFile.css`,
# it would load the `./myFile.styl` file, compile it
# and serve it.
stone.on '*.css', [
  Stone.loadFile '*.styl'
  Stone.compileStylFile()
]

# To build all your static assets, simply
# run `stone.build()`.

# In this case *Stone* loads the `./myFile.styl` file,
# compiles it and outputs it as `./myFile.css`
# to the `./build` directory.
stone.build './build'

# If you want to upload the files to *(let's say)*
# S3, you can do it the following way.
stone.build './build', [
  Stone.uploadBuild
    bucket 'assets'
    credentials:
      accessKeyId: 'foo'
      secretAccessKey: 'bar'
]

# In runtime, you can use `getScriptTag` to insert
# a `<script>` tag into a HTML template. Returns *(e.g.)*
# `<script src="...com/assets/myFile-aa8fc5808796304b.css">`.
stone.getScriptTag '/myFile.css'

# There are plenty more functions that you
# can use in runtime.

Status

Build Status Dependency Status NPM

Features


Table Of Contents

1.0.7-pre.1

9 years ago

1.0.6

9 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.1

12 years ago

0.1.0

12 years ago