Permalink
Browse files

add less

  • Loading branch information...
pmq20 committed Jun 6, 2017
1 parent ae1b204 commit cc472c48c87f079114a63b9ffbf1958970fd691f
Showing with 69 additions and 11 deletions.
  1. +1 −1 .babelrc
  2. +15 −3 app/javascript/packs/application.jsx
  3. +15 −0 config/webpack/loaders/less.js
  4. +2 −0 package.json
  5. +36 −7 yarn.lock
View
@@ -25,7 +25,7 @@
"import",
{
"libraryName": "antd",
"style": 'css',
"style": true,
}
],
]
@@ -7,7 +7,7 @@
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
// layout file, like app/views/layouts/application.html.erb
import 'antd/dist/antd.css';
import 'antd/dist/antd.less';
import React from 'react';
import ReactDOM from 'react-dom';
@@ -38,18 +38,30 @@ ReactDOM.render(
<span className="nav-text">Ruby</span>
</Menu.Item>
<Menu.Item>
<span className="nav-text">Fengdie</span>
<span className="nav-text">Npm</span>
</Menu.Item>
<Menu.Item>
<span className="nav-text">Yarn</span>
</Menu.Item>
<Menu.Item>
<span className="nav-text">Fengdie</span>
</Menu.Item>
<Menu.Item>
<span className="nav-text">Dora</span>
</Menu.Item>
<Menu.Item>
<span className="nav-text">Homebrew</span>
</Menu.Item>
<Menu.Item>
<span className="nav-text">CocoaPods</span>
</Menu.Item>
<Menu.Item>
<span className="nav-text">Homeland</span>
</Menu.Item>
</Menu>
<div className="ant-layout-sider-trigger addprj">
<a href="https://github.com/pmq20/enclose-io/issues/new">
<Button ghost icon="folder-add">Add Project</Button>
<Button ghost icon="plus">Add Project</Button>
</a>
</div>
</Sider>
@@ -0,0 +1,15 @@
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const { env } = require('../configuration.js')
module.exports = {
test: /\.less$/i,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{ loader: 'css-loader', options: { minimize: env.NODE_ENV === 'production' } },
{ loader: 'postcss-loader', options: { sourceMap: true } },
'resolve-url-loader',
{ loader: 'less-loader', options: { sourceMap: true } }
]
})
}
View
@@ -20,6 +20,8 @@
"file-loader": "^0.11.2",
"glob": "^7.1.2",
"js-yaml": "^3.8.4",
"less": "^2.7.2",
"less-loader": "^4.0.4",
"node-sass": "^4.5.3",
"path-complete-extname": "^0.1.0",
"postcss-loader": "^2.0.5",
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit cc472c4

Please sign in to comment.