-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsass is platform specific, therefore we can not ship it as a dependency. Instead, we will commit the compiled CSS for the UI Framework to the repository. This is updated when running `npm run uiFramework:start` which also starts the docs site. Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
- Loading branch information
Tyler Smalley
committed
Jan 9, 2017
1 parent
274ed4c
commit 2fb223f
Showing
132 changed files
with
925 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,4 @@ selenium | |
*.swp | ||
*.swo | ||
*.out | ||
src/ui_framework/doc_site/build/*.js* | ||
ui_framework/doc_site/build/*.js* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
const sass = require('node-sass'); | ||
const platform = require('os').platform(); | ||
|
||
module.exports = function (grunt) { | ||
const watcherCmd = { | ||
cmd: /^win/.test(platform) ? '.\\node_modules\\.bin\\node-sass' : './node_modules/.bin/node-sass', | ||
args: [ | ||
'ui_framework/components/index.scss', | ||
'--watch', | ||
'--recursive', | ||
'ui_framework/dist/ui_framework.css' | ||
] | ||
}; | ||
|
||
const serverCmd = { | ||
cmd: /^win/.test(platform) ? '.\\node_modules\\.bin\\webpack-dev-server' : './node_modules/.bin/webpack-dev-server', | ||
args: [ | ||
'--config=ui_framework/webpack.config.js', | ||
'--hot ', | ||
'--inline', | ||
'--content-base=ui_framework/doc_site/build' | ||
] | ||
}; | ||
|
||
function spawn(task) { | ||
return new Promise((resolve, reject) => { | ||
grunt.util.spawn(task, (error, result, code) => { | ||
grunt.log.writeln(); | ||
|
||
if (error || code !== 0) { | ||
const message = result.stderr || result.stdout; | ||
|
||
grunt.log.error(message); | ||
|
||
reject(); | ||
} | ||
|
||
grunt.log.writeln(result); | ||
|
||
resolve(); | ||
}); | ||
|
||
}); | ||
} | ||
|
||
grunt.registerTask('uiFramework:start', function () { | ||
const done = this.async(); | ||
const commands = [watcherCmd, serverCmd].map((cmd) => { | ||
return Object.assign({ opts: { stdio: 'inherit' } }, cmd); | ||
}); | ||
|
||
Promise.all(commands.map(spawn)).then(done); | ||
}); | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.