lilact 0.7.12 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +146 -83
- package/bin/bundle.cjs +122 -0
- package/bin/bundle.js +118 -0
- package/dist/lilact.development.js +220 -4
- package/dist/lilact.development.js.map +1 -1
- package/dist/lilact.development.min.js +2 -2
- package/dist/lilact.development.min.js.map +1 -1
- package/dist/lilact.production.min.js +1 -1
- package/dist/lilact.production.min.js.map +1 -1
- package/docs/assets/highlight.css +39 -25
- package/docs/classes/components.HTMLComponent.html +1 -1
- package/docs/classes/components.RootComponent.html +1 -1
- package/docs/functions/accessories.Spinner.html +2 -2
- package/docs/functions/redux.Provider.html +2 -2
- package/docs/functions/redux.connect.html +2 -2
- package/docs/functions/router.HashRouter.html +2 -2
- package/docs/functions/router.Link.html +2 -2
- package/docs/functions/router.NavLink.html +2 -2
- package/docs/functions/router.Routes.html +2 -2
- package/docs/functions/run.lazy.html +2 -2
- package/docs/functions/transition.CSSTransition.html +2 -2
- package/docs/index.html +95 -88
- package/docs/static/lilact.development.js +220 -4
- package/docs/static/lilact.development.min.js +2 -2
- package/docs/static/lilact.production.min.js +1 -1
- package/docs/variables/pane.ResizablePane.html +1 -1
- package/package.json +9 -4
- package/root/lilact.development.js +220 -4
- package/root/lilact.development.min.js +2 -2
- package/root/lilact.production.min.js +1 -1
- package/src/lilact.jsx +20 -7
- package/webpack.config.factory.cjs +124 -0
- package/webpack.config.js +32 -16
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const webpack = require('webpack');
|
|
3
|
+
|
|
4
|
+
module.exports = function webpackConfigFactory({
|
|
5
|
+
entry,
|
|
6
|
+
outputPath,
|
|
7
|
+
mode,
|
|
8
|
+
name
|
|
9
|
+
}) {
|
|
10
|
+
const entryAbs = path.isAbsolute(entry) ? entry : path.resolve(entry);
|
|
11
|
+
const lilactRoot = path.dirname(require.resolve("lilact/package.json"));
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
mode,
|
|
15
|
+
target: "web",
|
|
16
|
+
|
|
17
|
+
entry: entryAbs,
|
|
18
|
+
|
|
19
|
+
output: {
|
|
20
|
+
path: outputPath,
|
|
21
|
+
filename: name,
|
|
22
|
+
clean: true
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
resolve: {
|
|
26
|
+
extensions: [".js", ".cjs", ".mjs", ".json", ".css", ".jsx"]
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
module: {
|
|
30
|
+
rules: [
|
|
31
|
+
{
|
|
32
|
+
test: /\.jsx$/,
|
|
33
|
+
exclude: /node_modules/,
|
|
34
|
+
use: [{
|
|
35
|
+
loader: path.join(lilactRoot, 'src/loader.cjs'),
|
|
36
|
+
options: {
|
|
37
|
+
mode
|
|
38
|
+
}
|
|
39
|
+
}]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
test: /\.css$/i,
|
|
43
|
+
use: [
|
|
44
|
+
{
|
|
45
|
+
loader: "style-loader"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
loader: "css-loader",
|
|
49
|
+
options: {
|
|
50
|
+
// keeps behavior simple; you can enable modules if you want
|
|
51
|
+
modules: false,
|
|
52
|
+
importLoaders: 0
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
plugins: [
|
|
60
|
+
new webpack.BannerPlugin({
|
|
61
|
+
banner: `Lilact
|
|
62
|
+
Copyright (C) 2024-2025 Arash Kazemi <contact.arash.kazemi@gmail.com>
|
|
63
|
+
All rights reserved.
|
|
64
|
+
|
|
65
|
+
BSD-2-Clause
|
|
66
|
+
|
|
67
|
+
Redistribution and use in source and binary forms, with or without
|
|
68
|
+
modification, are permitted provided that the following conditions are met:
|
|
69
|
+
|
|
70
|
+
* Redistributions of source code must retain the above copyright
|
|
71
|
+
notice, this list of conditions and the following disclaimer.
|
|
72
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
73
|
+
notice, this list of conditions and the following disclaimer in the
|
|
74
|
+
documentation and/or other materials provided with the distribution.
|
|
75
|
+
|
|
76
|
+
--------------------------------------------------------------------------------
|
|
77
|
+
|
|
78
|
+
Lilact also includes the following libraries accessible as members of
|
|
79
|
+
the Lilact object:
|
|
80
|
+
|
|
81
|
+
@emotion/css:
|
|
82
|
+
Copyright (c) Emotion team and other contributors
|
|
83
|
+
MIT License
|
|
84
|
+
|
|
85
|
+
prop-types:
|
|
86
|
+
Copyright (c) 2013-present, Facebook, Inc.
|
|
87
|
+
MIT License
|
|
88
|
+
|
|
89
|
+
redux:
|
|
90
|
+
Copyright (c) 2015-present Dan Abramov
|
|
91
|
+
MIT License
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
* MIT License Notice:
|
|
95
|
+
|
|
96
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
97
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
98
|
+
in the Software without restriction, including without limitation the rights
|
|
99
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
100
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
101
|
+
furnished to do so, subject to the following conditions:
|
|
102
|
+
|
|
103
|
+
The above copyright notice and this permission notice shall be included in all
|
|
104
|
+
copies or substantial portions of the Software.
|
|
105
|
+
|
|
106
|
+
--------------------------------------------------------------------------------
|
|
107
|
+
|
|
108
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
109
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
110
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
111
|
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
|
112
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
113
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
114
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
115
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
116
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
117
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
118
|
+
`,
|
|
119
|
+
raw: false, // treat banner as text
|
|
120
|
+
entryOnly: false, // apply to all chunks; set true for entry only
|
|
121
|
+
}),
|
|
122
|
+
]
|
|
123
|
+
};
|
|
124
|
+
};
|
package/webpack.config.js
CHANGED
|
@@ -55,7 +55,7 @@ export default (env, argv) => {
|
|
|
55
55
|
optimization: {
|
|
56
56
|
concatenateModules: true, // scope hoisting
|
|
57
57
|
moduleIds: 'deterministic', // smaller stable ids (or 'hashed')
|
|
58
|
-
|
|
58
|
+
minimize: minify,
|
|
59
59
|
},
|
|
60
60
|
experiments: {
|
|
61
61
|
outputModule: true // enable module output
|
|
@@ -69,7 +69,7 @@ export default (env, argv) => {
|
|
|
69
69
|
path: path.resolve(__dirname, 'dist'),
|
|
70
70
|
library: {
|
|
71
71
|
type: 'module' // important: emit an ES module
|
|
72
|
-
|
|
72
|
+
},
|
|
73
73
|
},
|
|
74
74
|
resolve: {
|
|
75
75
|
// alias: {
|
|
@@ -99,16 +99,32 @@ export default (env, argv) => {
|
|
|
99
99
|
mode
|
|
100
100
|
}
|
|
101
101
|
}]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
test: /\.css$/i,
|
|
105
|
+
use: [
|
|
106
|
+
{
|
|
107
|
+
loader: "style-loader"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
loader: "css-loader",
|
|
111
|
+
options: {
|
|
112
|
+
// keeps behavior simple; you can enable modules if you want
|
|
113
|
+
modules: false,
|
|
114
|
+
importLoaders: 0
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
102
118
|
}
|
|
103
119
|
]
|
|
104
120
|
},
|
|
105
121
|
plugins: [{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
122
|
+
apply: (compiler) => {
|
|
123
|
+
compiler.hooks.done.tap('license-plugin', (compilation) => {
|
|
124
|
+
fs.readFile('./dist/' + filename, 'utf8', function(err, jssc) {
|
|
109
125
|
|
|
110
|
-
|
|
111
|
-
|
|
126
|
+
let out =
|
|
127
|
+
`/*
|
|
112
128
|
|
|
113
129
|
Lilact
|
|
114
130
|
Copyright (C) 2024-2025 Arash Kazemi <contact.arash.kazemi@gmail.com>
|
|
@@ -169,18 +185,18 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
169
185
|
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
170
186
|
|
|
171
187
|
*/
|
|
172
|
-
${jssc}`;
|
|
173
|
-
|
|
174
|
-
fs.writeFile('./dist/' + filename, out, {}, function() {});
|
|
175
|
-
fs.writeFile('./root/' + filename, out, {}, function() {});
|
|
176
|
-
});
|
|
188
|
+
${jssc}`;
|
|
177
189
|
|
|
190
|
+
fs.writeFile('./dist/' + filename, out, {}, function() {});
|
|
191
|
+
fs.writeFile('./root/' + filename, out, {}, function() {});
|
|
178
192
|
});
|
|
179
|
-
|
|
180
|
-
|
|
193
|
+
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
},
|
|
181
197
|
//new webpack.ProvidePlugin({
|
|
182
198
|
//Buffer: ['buffer', 'Buffer'],
|
|
183
199
|
// })
|
|
184
|
-
|
|
185
|
-
|
|
200
|
+
]
|
|
201
|
+
}
|
|
186
202
|
};
|