Skip to content

Commit

Permalink
Add description to readme for Semantic-Org/Semantic-UI-LESS#14 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Tazin committed Nov 30, 2016
1 parent cf52f73 commit 3e0489b
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,29 @@ npm install semantic-ui-less-module-loader --dev

### Configuration

Add loader for semantic-ui-less modules in your webpack config:
Add loaders for semantic-ui-less modules and it's assets in your webpack config:

```js
module: {
loaders: [

// less-loader
{
test: /\.less$/,
loader: ExtractTextPlugin.extract('style', 'css?!postcss!semantic-ui-less-module'),
include: [/node_modules[\/\\]semantic-ui-less/]
include: [/[\/\\]node_modules[\/\\]semantic-ui-less[\/\\]/]
},

// loader for static assets
{
test: /\.(png|jpg|jpeg|gif|svg)$/,
loader: 'url?limit=10240&absolute&name=images/[path][name]-[hash:7].[ext]',
include: [/[\/\\]node_modules[\/\\]semantic-ui-less[\/\\]/]
},
{
test: /\.(woff|woff2|ttf|svg|eot)$/,
loader: 'url?limit=10240&name=fonts/[name]-[hash:7].[ext]',
include: [/[\/\\]node_modules[\/\\]semantic-ui-less[\/\\]/]
}
]
},
Expand All @@ -41,4 +55,15 @@ semanticUiLessModuleLoader: {
- definitionsFolder (default: ${defaultFolder}/definitions)
- themesFolder (default: ${defaultFolder}/themes)
- themeConfigPath (default: ${defaultFolder}/theme.config.example)
- themePath (default: ${defaultFolder}/theme.less)
- themePath (default: ${defaultFolder}/theme.less)

#### To fix https://github.com/Semantic-Org/Semantic-UI-LESS/issues/14

Add to your site/globals/site.variables:

```less

@imagePath : '../assets/images';
@fontPath : '../assets/fonts';

```

0 comments on commit 3e0489b

Please sign in to comment.