mimosa
. But for that either mimosa
has to be rewritten or the core has to get some drastic changes. I get why people use tools like those, they have a big community and a lot of tutorials and example apps are out of it. Not even sure a big work like this is good, maybe a new (build)tool would be a better choice. I have ideas that inject
those gulp/grunt-tasks in a pre-defined workflow already prepared by the tool.
Hmmm still not showing the sourcemaps for me...
exports.config = {
modules: [
"bower",
"copy",
"jade",
"stylus",
"react",
"require",
"server",
"client-jade-static",
"server-template-compile",
"live-reload",
"server-reload",
"web-package"
],
bower: {
watch: true,
bowerDir: {
path: ".mimosa/bower_components",
clean: false
},
copy: {
enabled: true,
trackChanges: true,
outRoot: null,
exclude: [],
unknownMainFullCopy: true,
mainOverrides: {
"font-awesome": [{
"fonts": "../../font"
},
"css/font-awesome.css",
"fonts/fontawesome-webfont.ttf"
]
},
strategy: "packageRoot",
togetherRoot: "components",
forceLatest: true,
pathMod: []
}
},
serverReload: {
watch: ["server.js", "server.ls", "server.iced", "routes", "src", "lib", "/assets/javascripts/json/data.json"],
exclude: [],
validate: true
},
stylus: {
lib: require('stylus'),
extensions: ["styl"],
use: ['nib'],
import: ['nib'],
define: {},
includes: [],
sourceMap: true
},
clientJadeStatic: {
context: {},
outputExtension: '.html',
extensionRegex: /.html.[a-zA-Z]+$/,
prettyOutput: true
},
react: {
lib: undefined,
extensions: ["jsx"],
options: {
harmony: false,
sourceMap: true
}
}
};
Anyone see anything I'm missing that would prevent it from working?
node_modules/mimosa-stylus
to force the reload of the latest module. Or you can update your modules
list to have mimosa-stylus@1.4.0
{
"name": "mimosa-stylus",
"version": "1.4.0",
watch.sourceDir
as do pretty much all the modules. Your options are probably 1) Get your server and UI code both within the watch.sourceDir
or 2) run two projects, one for server, one for UI. Future releases will allow having a single project with entirely different profiles running differently on different folders, but for now its a single input folder.
I managed to shim it with this configuration:
exports.startServer = (config, callback) ->
requirejs = require 'requirejs'
requirejs.config(
nodeRequire = require
)
requirejs ["#{__dirname}/app"], (app) ->
app.startServer config, callback
Thanks for Mimosa, it really helped me to get started on NodeJS! :)