This repository has been archived by the owner on Jan 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rocjs/feature/initial
Initial
- Loading branch information
Showing
15 changed files
with
207 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. | ||
# Requires EditorConfig JetBrains Plugin - http://github.com/editorconfig/editorconfig-jetbrains | ||
|
||
# Set this file as the topmost .editorconfig | ||
# (multiple files can be used, and are applied starting from current document location) | ||
root = true | ||
|
||
[{package.json}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# Use bracketed regexp to target specific file types or file locations | ||
[*.{js,json}] | ||
|
||
# Use hard or soft tabs ["tab", "space"] | ||
indent_style = space | ||
|
||
# Size of a single indent [an integer, "tab"] | ||
indent_size = tab | ||
|
||
# Number of columns representing a tab character [an integer] | ||
tab_width = 4 | ||
|
||
# Line breaks representation ["lf", "cr", "crlf"] | ||
end_of_line = lf | ||
|
||
# ["latin1", "utf-8", "utf-16be", "utf-16le"] | ||
charset = utf-8 | ||
|
||
# Remove any whitespace characters preceding newline characters ["true", "false"] | ||
trim_trailing_whitespace = true | ||
|
||
# Ensure file ends with a newline when saving ["true", "false"] | ||
insert_final_newline = true |
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,6 @@ | ||
node_modules | ||
*.log | ||
.DS_Store | ||
lib | ||
esdocs | ||
coverage |
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,9 @@ | ||
sudo: required | ||
language: node_js | ||
node_js: | ||
- 4.2 | ||
- stable | ||
before_script: | ||
- npm run link | ||
after_success: | ||
- npm run build |
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
# roc-plugin-style-sass | ||
# roc-plugin-style-sass | ||
[![Build Status](https://travis-ci.org/rocjs/roc-plugin-style-sass.svg?branch=master)](https://travis-ci.org/rocjs/roc-plugin-style-sass) | ||
|
||
__Plugin providing Sass support for Webpack__ | ||
- [roc-plugin-style-sass](/packages/roc-plugin-style-sass) |
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,15 @@ | ||
{ | ||
"name": "roc-plugin-style-sass", | ||
"private": true, | ||
"license": "MIT", | ||
"scripts": { | ||
"rid": "rid", | ||
"build": "rid build", | ||
"lint": "rid lint:alias", | ||
"link": "rid link", | ||
"test": "npm run lint" | ||
}, | ||
"devDependencies": { | ||
"@rocjs/roc-internal-dev": "^1.0.0" | ||
} | ||
} |
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,3 @@ | ||
lib | ||
esdocs | ||
docs |
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,13 @@ | ||
{ | ||
"extends": "vgno", | ||
|
||
"parser": "babel-eslint", | ||
|
||
"env": { | ||
"es6": true | ||
}, | ||
|
||
"ecmaFeatures": { | ||
"modules": true | ||
} | ||
} |
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,8 @@ | ||
# roc-plugin-style-sass | ||
Plugin providing Sass support for Webpack. | ||
|
||
## Documentation | ||
- [Actions](/packages/roc-plugin-style-sass/docs/Actions.md) | ||
- [Commands](/packages/roc-plugin-style-sass/docs/Commands.md) | ||
- [Hooks](/packages/roc-plugin-style-sass/docs/Hooks.md) | ||
- [Settings](/packages/roc-plugin-style-sass/docs/Settings.md) |
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,14 @@ | ||
# Actions for `roc-plugin-style-sass` | ||
|
||
## Actions | ||
* [roc-plugin-style-sass](#roc-plugin-style-sass) | ||
* [sass](#sass) | ||
|
||
## roc-plugin-style-sass | ||
|
||
### sass | ||
|
||
Adds Sass support to Webpack. | ||
|
||
__Connects to extension:__ `roc-plugin-style-css` | ||
__Connects to hook:__ `add-style` |
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 @@ | ||
No commands available. |
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 @@ | ||
No hooks available. |
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,9 @@ | ||
# Settings for `roc-plugin-style-sass` | ||
|
||
## Build | ||
|
||
### Sass | ||
|
||
| Name | Description | Path | CLI option | Default | Type | Required | | ||
| ---------- | -------------------------------------------------------------------------------------------------- | --------------------- | ----------------------- | ------- | --------- | -------- | | ||
| useBourbon | If Bourbon should be made available to include easily with `@import "bourbon";`. | build.sass.useBourbon | --build-sass-useBourbon | `true` | `Boolean` | No | |
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,37 @@ | ||
{ | ||
"name": "roc-plugin-style-sass", | ||
"version": "1.0.0-alpha.0", | ||
"description": "Plugin providing Sass support for Webpack in Roc", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"lint": "eslint .", | ||
"test": "npm run lint" | ||
}, | ||
"files": [ | ||
"lib" | ||
], | ||
"keywords": [ | ||
"roc", | ||
"roc-package", | ||
"webpack", | ||
"roc-dev" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/rocjs/roc-plugin-style-sass.git" | ||
}, | ||
"author": "VG", | ||
"license": "MIT", | ||
"dependencies": { | ||
"bourbon": "~4.2.6", | ||
"node-sass": "~3.4.2", | ||
"roc": "^1.0.0-rc", | ||
"sass-loader": "~3.1.2", | ||
"webpack": "~1.12.14" | ||
}, | ||
"devDependencies": { | ||
"babel-eslint": "~5.0.0", | ||
"eslint": "~1.10.3", | ||
"eslint-config-vgno": "~5.0.0" | ||
} | ||
} |
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,6 @@ | ||
const path = require('path'); | ||
|
||
// Makes it possible for use to generate documentation for this package. | ||
module.exports = { | ||
packages: [path.join(__dirname, 'lib', 'index.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { isBoolean } from 'roc/validators'; | ||
|
||
export const roc = { | ||
name: require('../package.json').name, | ||
config: { | ||
settings: { | ||
build: { | ||
sass: { | ||
useBourbon: true | ||
} | ||
} | ||
} | ||
}, | ||
meta: { | ||
settings: { | ||
descriptions: { | ||
build: { | ||
sass: { | ||
useBourbon: 'If Bourbon should be made available to include easily with `@import "bourbon";`.' | ||
} | ||
} | ||
}, | ||
|
||
validations: { | ||
build: { | ||
sass: { | ||
useBourbon: isBoolean | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
actions: { | ||
sass: { | ||
extension: 'roc-plugin-style-css', | ||
hook: 'add-style', | ||
description: 'Adds Sass support to Webpack.', | ||
action: () => ({ settings }) => () => () => ({ | ||
extensions: ['sass', 'scss'], | ||
loaders: `${require.resolve('sass-loader')}?sourceMap${settings.build.sass.useBourbon ? | ||
'&includePaths[]=' + require('bourbon').includePaths : '' | ||
}` | ||
}) | ||
} | ||
} | ||
}; |