Skip to content

Commit

Permalink
Merge pull request #151 from PrestaShop/develop
Browse files Browse the repository at this point in the history
Release 1.2.3
  • Loading branch information
Progi1984 authored Apr 14, 2021
2 parents 0134ac6 + 9798d88 commit 38cacc3
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 110 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: NPM Release
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Open up `admin-dev/themes/new-theme/package.json` of your PrestaShop install, an
```js
{
// ...
prestakit: "1.2.2";
prestakit: "1.2.3";
// ...
}
```
Expand Down
2 changes: 1 addition & 1 deletion dist/css/bootstrap-prestashop-ui-kit.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap-prestashop-ui-kit.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/prestashop-ui-kit.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/prestashop-ui-kit.js.map

Large diffs are not rendered by default.

17 changes: 4 additions & 13 deletions js/prestashop-ui-kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,25 +98,16 @@ $.fn.pstooltip = $.fn.tooltip;
$this.html('<b>Read More</b>');
}
$this.css('cursor', 'pointer');
$this
.parent()
.after('<div class="' + actualClass + ' alert-down" role="alert"><p class="alert-down-text"></p></div>');
jQuery('.alert-down-text').html(actualHtml);
$this.parent().append('<div class="alert-down" role="alert"><p class="alert-down-text"></p></div>');
$this.parent().find('.alert-down').slideUp(0);
$this.parent().find('.alert-down-text').html(actualHtml);
}
});

$('.alert-drop').each(function () {
var $this = jQuery(this);
$this.click(function () {
var radius = $this.css('border-radius');
if ($this.next('div').is(':hidden')) {
$this.css('border-radius', '0');
$this.css('border-bottom', 'none');
} else {
$this.css('border-radius', radius);
$this.css('border-bottom', '');
}
$this.next('div').slideToggle(400);
$('.alert-down', $this).slideToggle(400);
});
});
};
Expand Down
4 changes: 3 additions & 1 deletion js/utils/migrate-mute.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
if (
typeof jQuery.migrateMute === 'undefined' &&
typeof window.prestashop !== 'undefined' &&
typeof window.prestashop.debug !== 'undefined'
typeof window.prestashop.debug !== 'undefined' &&
typeof devMode !== 'undefined'
) {
jQuery.migrateMute = !window.prestashop.debug;
jQuery.migrateTrace = devMode;
}
})();
44 changes: 13 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prestakit",
"version": "1.2.2",
"version": "1.2.3",
"description": "Prestashop UI Kit integration",
"repository": {
"type": "git",
Expand All @@ -26,7 +26,7 @@
"dependencies": {
"jquery.growl": "^1.3.5",
"bootstrap": "^4.4.1",
"material-design-icons-iconfont": "^5.0.1",
"material-design-icons-iconfont": "^6.1.0",
"select2": "^4.0.5",
"select2-bootstrap-theme": "0.1.0-beta.10",
"open-sans-fonts": "^1.6.2"
Expand Down
112 changes: 54 additions & 58 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,99 +1,95 @@
const webpack = require("webpack");
const path = require("path");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const webpack = require('webpack');
const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

const devMode = process.env.NODE_ENV !== "production";
const devMode = process.env.NODE_ENV !== 'production';

let config = {
entry: {
main: ["./js/prestashop-ui-kit.js", "./scss/application.scss"]
main: ['./js/prestashop-ui-kit.js', './scss/application.scss'],
},
output: {
path: path.resolve(__dirname, "./dist/js"),
filename: "prestashop-ui-kit.js"
path: path.resolve(__dirname, './dist/js'),
filename: 'prestashop-ui-kit.js',
},
devtool: devMode ? "inline-source-map" : "source-map",
devtool: devMode ? 'inline-source-map' : 'source-map',
module: {
rules: [
{
test: /\.js/,
loader: "babel-loader",
loader: 'babel-loader',
options: {
presets: [
["@babel/preset-env", { useBuiltIns: "entry", modules: false }]
]
}
presets: [['@babel/preset-env', {useBuiltIns: 'entry', modules: false}]],
},
},
{
test: require.resolve("jquery"),
loader: "expose-loader?jQuery!expose-loader?$"
test: require.resolve('jquery'),
loader: 'expose-loader?jQuery!expose-loader?$',
},
{
test: require.resolve("tether"),
loader: "expose-loader?tether!expose-loader?Tether"
test: require.resolve('tether'),
loader: 'expose-loader?tether!expose-loader?Tether',
},
{
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: "css-loader",
loader: 'css-loader',
options: {
minimize: !devMode,
sourceMap: true
}
sourceMap: true,
},
},
{
loader: "postcss-loader",
loader: 'postcss-loader',
options: {
sourceMap: true
}
sourceMap: true,
},
},
{
loader: "sass-loader",
loader: 'sass-loader',
options: {
includePaths: [path.resolve(__dirname, "./node_modules")],
sourceMap: true
}
}
]
includePaths: [path.resolve(__dirname, './node_modules')],
sourceMap: true,
},
},
],
},
{
test: /\.css$/,
use: [
{ loader: MiniCssExtractPlugin.loader },
"style-loader",
"css-loader",
"postcss-loader"
]
use: [{loader: MiniCssExtractPlugin.loader}, 'style-loader', 'css-loader', 'postcss-loader'],
},
{
test: /.(gif|png|woff(2)?|eot|ttf|svg)(\?[a-z0-9=\.]+)?$/,
use: [
{
loader: "file-loader",
loader: 'file-loader',
options: {
name: "[hash].[ext]",
name: '[hash].[ext]',
esModule: false,
outputPath: "../css"
}
}
]
}
]
outputPath: '../css',
},
},
],
},
],
},
plugins: [
new webpack.DefinePlugin({
devMode,
}),
new MiniCssExtractPlugin({
filename: "../css/bootstrap-prestashop-ui-kit.css"
filename: '../css/bootstrap-prestashop-ui-kit.css',
}),
new webpack.ProvidePlugin({
jQuery: "jquery",
$: "jquery",
"window.Tether": "tether",
Popper: ["popper.js", "default"]
})
]
jQuery: 'jquery',
$: 'jquery',
'window.Tether': 'tether',
Popper: ['popper.js', 'default'],
}),
],
};

if (!devMode) {
Expand All @@ -110,15 +106,15 @@ if (!devMode) {
booleans: true,
if_return: true,
join_vars: true,
drop_console: true
pure_funcs: ['console.warn'],
},
output: {
comments: false
}
}
})
]
}
comments: false,
},
},
}),
],
},
});
}

Expand Down

0 comments on commit 38cacc3

Please sign in to comment.