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

@ttskch/select2-bootstrap4-theme

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ttskch/select2-bootstrap4-theme - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

.github/FUNDING.yml

1

docs/script.js

@@ -8,4 +8,5 @@ $(function () {

allowClear: Boolean($(this).data('allow-clear')),
closeOnSelect: !$(this).attr('multiple'),
});
});
});

35

package.json
{
"name": "@ttskch/select2-bootstrap4-theme",
"version": "1.4.0",
"version": "1.5.0",
"description": "Select2 v4 theme for Bootstrap4",

@@ -9,6 +9,8 @@ "main": "",

"build": "webpack --config webpack.config.js --mode development",
"build:prod": "NODE_ENV=production webpack --config webpack.config.js --mode production",
"build:prod": "webpack --config webpack.config.js --mode production",
"build:both": "npm run build && npm run build:prod",
"prepare": "ln -sf ../dist/select2-bootstrap4.css docs/",
"watch": "npm run prepare && npm run build -- --watch"
"watch": "npm run prepare && npm run build -- --watch",
"lint": "stylelint ./src/**/*.{scss,sass,css}",
"lint:fix": "stylelint ./src/**/*.{scss,sass,css} --fix"
},

@@ -34,15 +36,16 @@ "repository": {

"devDependencies": {
"autoprefixer": "^9.4.2",
"bootstrap": "^4.1.3",
"css-loader": "^1.0.1",
"cssnano": "^4.1.7",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"node-sass": "^4.10.0",
"postcss": "^7.0.6",
"postcss-loader": "^3.0.0",
"precss": "^4.0.0",
"sass-loader": "^8.0.2",
"style-loader": "^0.23.1",
"webpack": "^4.27.0",
"webpack-cli": "^3.1.2"
"autoprefixer": "^10.2.3",
"bootstrap": "^4.6.0",
"css-loader": "^5.0.1",
"mini-css-extract-plugin": "^1.3.4",
"node-sass": "^5.0.0",
"postcss": "^8.2.4",
"postcss-loader": "^4.2.0",
"sass-loader": "^10.1.1",
"style-loader": "^2.0.0",
"stylelint": "^13.9.0",
"stylelint-config-twbs-bootstrap": "^2.1.0",
"stylelint-webpack-plugin": "^2.1.1",
"webpack": "^5.16.0",
"webpack-cli": "^4.4.0"
},

@@ -49,0 +52,0 @@ "jsdelivr": "dist/select2-bootstrap4.min.css",

@@ -15,8 +15,19 @@ # select2-bootstrap4-theme

### CDN
```html
<link rel="stylesheet" href="/path/to/select2.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ttskch/select2-bootstrap4-theme/dist/select2-bootstrap4.css">
```
### Manually
```bash
# npm
$ npm install @ttskch/select2-bootstrap4-theme
# yarn
$ yarn add @ttskch/select2-bootstrap4-theme
```
## Usage
```html

@@ -27,2 +38,4 @@ <link rel="stylesheet" href="/path/to/select2.css">

## Usage
```js

@@ -36,5 +49,5 @@ $('select').select2({

1. Fix [src/layout.scss](src/layout.scss), [src/_single.scss](src/_single.scss) or [src/_multiple.scss](src/_multiple.scss)
1. Fix [src/_layout.scss](src/_layout.scss), [src/_single.scss](src/_single.scss) or [src/_multiple.scss](src/_multiple.scss)
1. Do `npm run build:both`
1. Send me a Pull Requeest
1. Send me a Pull Request

@@ -45,3 +58,3 @@ You can use [docs](docs) dir for your development.

1. Serve `docs` with your local web server (e.g. `php -S localhost:8888 -t docs`)
1. Do `npm watch`
1. Do `npm run watch`
1. Tweak scss and browse demo page on your browser

@@ -1,56 +0,49 @@

const path = require('path');
const path = require('path')
const ProvidePlugin = require('webpack/lib/ProvidePlugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ProvidePlugin = require('webpack/lib/ProvidePlugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const StyleLintPlugin = require('stylelint-webpack-plugin')
const isProd = process.env.NODE_ENV === 'production';
module.exports = (env, argv) => {
const isProd = argv.mode === 'production'
let plugins = [
new ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
Popper: ['popper.js', 'default'],
}),
new ExtractTextPlugin({
filename: '[name]' + (isProd ? '.min' : '') + '.css',
allChunks: true,
}),
];
const plugins = [
new ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
Popper: ['popper.js', 'default'],
}),
new MiniCssExtractPlugin({
filename: '[name]' + (isProd ? '.min' : '') + '.css',
}),
new StyleLintPlugin({
files: './src/**/*.(scss|sass|css)',
}),
]
module.exports = {
entry: {
'select2-bootstrap4': [
'./src/layout.scss',
],
},
output: {
path: path.resolve(__dirname, './dist'),
filename: '[name].js',
},
module: {
rules: [
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
return {
entry: {
'select2-bootstrap4': [
'./src/select2-bootstrap4.scss',
],
},
output: {
path: path.resolve(__dirname, './dist'),
filename: '[name].js',
},
module: {
rules: [
{
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
{
loader: 'css-loader',
},
{
loader: 'postcss-loader',
options: {
plugins: () => {
let plugins = [
require('precss'), // bootstrap4 requires this
require('autoprefixer'),
];
if (isProd) {
plugins = plugins.concat([
require('cssnano')({ preset: 'default' }),
])
}
return plugins;
postcssOptions: {
plugins: [
'autoprefixer',
],
},

@@ -62,3 +55,3 @@ },

options: {
prependData: `
additionalData: `
@import "~bootstrap/scss/functions";

@@ -68,10 +61,10 @@ @import "~bootstrap/scss/variables";

`
}
},
},
],
}),
},
],
},
plugins: plugins,
};
},
],
},
plugins: plugins,
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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