Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@afp/toolkit-styles

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@afp/toolkit-styles - npm Package Compare versions

Comparing version 1.3.3 to 2.0.0

.postcssrc.js

48

package.json
{
"name": "@afp/toolkit-styles",
"version": "1.3.3",
"version": "2.0.0",
"description": "",
"main": "dist/main.bundle.css",
"scripts": {
"dev": "webpack --watch",
"build": "webpack -p",
"prepublishOnly": "npm run build",
"dev": "webpack-serve --mode development --open",
"build": "webpack --mode production",
"test": "echo \"Error: no test specified\" && exit 1"

@@ -14,22 +13,27 @@ },

"license": "ISC",
"browserslist": "last 3 versions",
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"devDependencies": {
"autoprefixer": "^7.2.4",
"css-loader": "^0.28.8",
"cssnano": "^3.10.0",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.6",
"node-sass": "^4.7.2",
"postcss-import": "^11.0.0",
"postcss-scss": "^1.0.3",
"sass-loader": "^6.0.6",
"style-loader": "^0.19.1",
"url-loader": "^0.6.2",
"webpack": "^3.10.0"
},
"dependencies": {
"clean-webpack-plugin": "^0.1.17",
"normalize.css": "^7.0.0",
"postcss-loader": "^2.0.10"
"autoprefixer": "^8.6.4",
"clean-webpack-plugin": "^0.1.19",
"css-loader": "^0.28.11",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^0.4.0",
"node-sass": "^4.9.0",
"normalize.css": "^8.0.0",
"optimize-css-assets-webpack-plugin": "^4.0.3",
"postcss-import": "^11.1.0",
"postcss-loader": "^2.1.5",
"postcss-scss": "^1.0.6",
"sass-loader": "^7.0.3",
"url-loader": "^1.0.1",
"webpack": "^4.12.1",
"webpack-cli": "^3.0.8",
"webpack-hot-client": "^4.0.3",
"webpack-serve": "^1.0.4"
}
}

@@ -9,7 +9,20 @@ # Toolkit-styles

Then in your entry js
Then in your entry js :
```
import '@afp/toolkit-styles/dist/index.bundle.css'
import '@afp/toolkit-styles'
```
or in Sass :
```
@import url('~@afp/toolkit-styles');
```
If you need the variables in Sass :
```
@import "~@afp/toolkit-styles/src/scss/variables.scss";
```
# Requirements

@@ -21,3 +34,4 @@

Just `npm run dev`, then open `/index.html` (yes, just double-click) with your browser. Feel free to modify this file to add new markup, and to modify styles in the scss folder.
Just `npm install` then `npm run dev` and the page will open in your browser.
Feel free to modify this file to add new markup, and to modify styles in the scss folder.

@@ -30,3 +44,3 @@ Node watch these files and automatically rebuild the CSS styles in dist/ folder.

Not very necessary, but you can build without watch with `npm run build`. Then you can publish your module with `npm publish`.
`npm run build`, then you can publish your module with `npm publish`.

@@ -33,0 +47,0 @@ # Contributing

@@ -1,12 +0,11 @@

const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const { resolve } = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
module.exports = {
entry: ['./scss/index.scss'],
output: {
filename: 'index.bundle.css',
path: path.resolve(__dirname, 'dist')
},
mode: process.env.WEBPACK_SERVE ? 'development' : 'production',
target: 'web',
entry: resolve(__dirname, 'src', 'index.js'),
module: {

@@ -16,11 +15,16 @@ rules: [

test: /\.css$/,
use: ExtractTextPlugin.extract({
use: ['css-loader', 'postcss-loader']
})
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader'
]
},
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
use: ['css-loader', 'postcss-loader', 'sass-loader']
})
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader',
'sass-loader'
]
},

@@ -41,9 +45,20 @@ {

},
optimization: {
minimizer: [
new OptimizeCSSAssetsPlugin()
]
},
plugins: [
new CleanWebpackPlugin('dist'),
new ExtractTextPlugin({
filename: 'index.bundle.css',
allChunks: true
new CleanWebpackPlugin(resolve(__dirname, 'dist')),
new MiniCssExtractPlugin({
filename: '[name].bundle.css'
}),
new HtmlWebpackPlugin({
template: resolve(__dirname, 'index.html')
})
]
}
],
serve: {
content: resolve(__dirname, 'dist'),
hot: true
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc