Skip to content

Commit

Permalink
Fix rollup + Babel
Browse files Browse the repository at this point in the history
  • Loading branch information
djibe committed Apr 3, 2021
1 parent 043ccd5 commit ea584ce
Show file tree
Hide file tree
Showing 13 changed files with 3,798 additions and 16,437 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- **Fixed** Various bugs related to IE11 (`card-img` aspect ratio, Material Icons, Select2 items alignment, chip close icon).
- **Fixed** Datatables.net search displays suitable number of results.
- **Fixed** Various minor changes.
- **Improved** JavaScript compilation.

## 4.6.0 - RC1

Expand Down
4 changes: 2 additions & 2 deletions assets/js/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import $ from 'jquery'
// import $ from 'jquery'
import ExpansionPanel from './src/expansion-panel'
import FloatingLabel from './src/floating-label'
import NavDrawer from './src/nav-drawer'
Expand All @@ -17,4 +17,4 @@ export {
Ripplet,
SelectionControlFocus,
TabSwitch
}
}
2 changes: 2 additions & 0 deletions assets/scss/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ ul {
}

// djibe addition looks like https://developers.google.com/style/lists
// TODO: doc
.list-material {
padding-left: 2.5rem;

Expand All @@ -173,6 +174,7 @@ dd {
&:not([class*='col']) {
padding-left: 2.5rem;

> ol,
> ul {
padding-left: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/material/_selection-control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
&::after {
color: $selection-control-color;
display: block;
opacity: $black-secondary-opacity;
// opacity: $black-secondary-opacity;
position: absolute;
top: (($font-size-base * $line-height-base - $selection-control-indicator-size) / 2);
left: 0;
Expand Down
18 changes: 12 additions & 6 deletions build/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import babel from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import nodeResolve from '@rollup/plugin-node-resolve'
import resolve from '@rollup/plugin-node-resolve'

const pkg = require('../package.json')
const year = new Date().getFullYear()

const external = ['jquery']
const globals = {
'jquery': '$'
jquery: 'jQuery'
}

const config = [
nodeResolve(),
const pluginsConfig = [
resolve(),
commonjs(),
babel({
babelHelpers: 'bundled',
exclude: 'node_modules/**',
ignore: [
/\/core-js/
],
sourceType: 'unambiguous',
presets: [
[
Expand All @@ -24,7 +29,7 @@ const config = [
loose: true,
modules: false,
spec: true,
useBuiltIns: 'usage',
useBuiltIns: 'entry',
corejs: {
version: 3,
proposals: false
Expand All @@ -36,6 +41,7 @@ const config = [
]

export default {
external,
input: 'assets/js/index.js',
// TODO: https://stackoverflow.com/questions/55112048/rollup-babel-preset-env-babel-polyfill
output: {
Expand All @@ -46,5 +52,5 @@ export default {
name: 'material'
},
context: 'this',
plugins: config
plugins: pluginsConfig
}
5 changes: 5 additions & 0 deletions css/material.css

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

2 changes: 1 addition & 1 deletion css/material.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/material.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/material.min.css.map

Large diffs are not rendered by default.

Loading

0 comments on commit ea584ce

Please sign in to comment.