Browse Source

Initial packaging

pull/10321/head
Tim Kelty 4 years ago
parent
commit
ce2c945159
  1. 4791
      package-lock.json
  2. 1
      package.json
  3. 2
      packages/craftcms-garnish/dist/garnish.js
  4. 6
      packages/craftcms-garnish/webpack.config.js
  5. 3
      src/web/assets/garnish/GarnishAsset.php
  6. 2
      src/web/assets/garnish/dist/garnish.js
  7. 14
      src/web/assets/garnish/dist/garnish.js.LICENSE.txt
  8. 19
      src/web/assets/garnish/webpack.config.js
  9. 6
      webpack.config.js

4791
package-lock.json
File diff suppressed because it is too large
View File

1
package.json

@ -13,6 +13,7 @@
"dependencies": {
"@benmajor/jquery-touch-events": "^2.0.3",
"@craftcms/sass": "./packages/craftcms-sass",
"@craftcms/garnish": "./packages/craftcms-garnish",
"@pixelandtonic/craftui": "~0.3.8",
"accounting": "^0.4.1",
"axios": "^0.21.4",

2
packages/craftcms-garnish/dist/garnish.js
File diff suppressed because it is too large
View File

6
packages/craftcms-garnish/webpack.config.js

@ -4,8 +4,11 @@ const { getConfig } = require('@craftcms/webpack');
const MergeIntoSingleFilePlugin = require('webpack-merge-and-include-globally');
const glob = require('glob');
// chdir so the glob commands work when running from outside this dir
process.chdir(__dirname);
const files = glob.sync('lib/*.js');
files.push(...glob.sync('src/Base*.js'), 'src/Garnish.js');
files.push('src/Garnish.js', ...glob.sync('src/Base*.js'));
files.push(...glob.sync('src/*.js', {
ignore: files
}));
@ -13,6 +16,7 @@ files.push(...glob.sync('src/*.js', {
module.exports = getConfig({
context: __dirname,
config: {
name: 'garnish',
plugins: [
new MergeIntoSingleFilePlugin({
files: {

3
src/web/assets/garnish/GarnishAsset.php

@ -23,8 +23,7 @@ class GarnishAsset extends AssetBundle
*/
public function init()
{
$this->sourcePath = __DIR__ . '/dist';
$this->sourcePath = '@vendor/craftcms/cms/packages/craftcms-garnish/dist';
$this->depends = [
ElementResizeDetectorAsset::class,
JqueryAsset::class,

2
src/web/assets/garnish/dist/garnish.js
File diff suppressed because it is too large
View File

14
src/web/assets/garnish/dist/garnish.js.LICENSE.txt

@ -1,14 +0,0 @@
/*!
Base.js, version 1.1a
Copyright 2006-2010, Dean Edwards
License: http://www.opensource.org/licenses/mit-license.php
*/
/**
* Garnish UI toolkit
*
* @copyright 2013 Pixel & Tonic, Inc.. All rights reserved.
* @author Brandon Kelly <brandon@pixelandtonic.com>
* @version 0.1.48
* @license MIT
*/

19
src/web/assets/garnish/webpack.config.js

@ -1,19 +0,0 @@
/* jshint esversion: 6 */
/* globals module, require, __dirname */
const {getConfig} = require('@craftcms/webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = getConfig({
context: __dirname,
config: {
plugins: [
new CopyWebpackPlugin({
patterns: [
{
from: require.resolve('garnishjs/dist/garnish.js'),
}
],
}),
]
}
});

6
webpack.config.js

@ -1,3 +1,7 @@
const {getConfigs} = require('@craftcms/webpack');
const garnishConfig = require('@craftcms/garnish');
module.exports = getConfigs();
module.exports = [
garnishConfig,
...getConfigs()
];
Loading…
Cancel
Save