Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop postcss #2418

Merged
merged 2 commits into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/web1/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Create a widget manager instance.
var WidgetManager = require('./manager').WidgetManager;

require('@jupyter-widgets/controls/css/widgets.built.css');
require('@jupyter-widgets/controls/css/widgets.css');

document.addEventListener("DOMContentLoaded", function(event) {
var manager = new WidgetManager(document.body);
Expand Down
2 changes: 1 addition & 1 deletion examples/web2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require("codemirror/lib/codemirror.css");
require("codemirror/mode/python/python");
var WidgetManager = require("./manager").WidgetManager;

require('@jupyter-widgets/controls/css/widgets.built.css');
require('@jupyter-widgets/controls/css/widgets.css');
require('font-awesome/css/font-awesome.css');

document.addEventListener("DOMContentLoaded", function(event) {
Expand Down
4 changes: 0 additions & 4 deletions packages/controls/css/widgets.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
* Distributed under the terms of the Modified BSD License.
*/

/* We import all of these together in a single css file because the Webpack
loader sees only one file at a time. This allows postcss to see the variable
definitions when they are used. */

@import "./labvariables.css";
@import "./widgets-base.css";
4 changes: 0 additions & 4 deletions packages/html-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.3",
"mocha": "^3.3.0",
"postcss": "^6.0.2",
"postcss-cssnext": "^3.0.2",
"postcss-import": "^10.0.0",
"postcss-loader": "^2.0.6",
"rimraf": "^2.6.1",
"style-loader": "^0.18.1",
"tslint": "^5.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/html-manager/src/libembed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ __webpack_public_path__ = (window as any).__jupyter_widgets_assets_path__ || __w

import 'font-awesome/css/font-awesome.css';
import '@phosphor/widgets/style/index.css';
import '@jupyter-widgets/controls/css/widgets.built.css';
import '@jupyter-widgets/controls/css/widgets.css';

// Used just for the typing. We must not import the javascript because we don't
// want to include it in the require embedding.
Expand Down
25 changes: 1 addition & 24 deletions packages/html-manager/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,10 @@ var path = require('path');

var version = require('./package.json').version;

var postcss = require('postcss');

var rules = [
{ test: /\.css$/, use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
plugins: [
postcss.plugin('delete-tilde', function() {
return function (css) {
css.walkAtRules('import', function(rule) {
rule.params = rule.params.replace('~', '');
});
};
}),
postcss.plugin('prepend', function() {
return function(css) {
css.prepend("@import '@jupyter-widgets/controls/css/labvariables.css';")
}
}),
require('postcss-import')(),
require('postcss-cssnext')()
]
}
}
'css-loader'
]},
// jquery-ui loads some images
{ test: /\.(jpg|png|gif)$/, use: 'file-loader' },
Expand Down
3 changes: 0 additions & 3 deletions widgetsnbextension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
"devDependencies": {
"css-loader": "^0.28.4",
"json-loader": "^0.5.4",
"postcss-cssnext": "^3.0.2",
"postcss-import": "^10.0.0",
"postcss-loader": "^2.0.6",
"rimraf": "^2.6.1",
"style-loader": "^0.18.1",
"webpack": "^3.5.5"
Expand Down
13 changes: 2 additions & 11 deletions widgetsnbextension/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,7 @@ module.exports = {
rules: [
{ test: /\.css$/, use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
plugins: [
require('postcss-import'),
require('postcss-cssnext')
]
}
}
'css-loader'
]},
// jquery-ui loads some images
{ test: /\.(jpg|png|gif)$/, use: 'file-loader' },
Expand All @@ -30,6 +21,6 @@ module.exports = {
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, use: 'url-loader?limit=10000&mimetype=application/octet-stream' },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, use: 'file-loader' },
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, use: 'url-loader?limit=10000&mimetype=image/svg+xml' }
]
]
},
};