Skip to content

Commit 6bf4fc7

Browse files
committed
Setup project
0 parents  commit 6bf4fc7

20 files changed

+830
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/*
2+
yarn.lock
3+
public/*
4+
test/public/*
5+
.idea/*
6+
builder
7+
test/test-vendor-replace/public/dist

babel.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = function (api) {
2+
api.cache(true);
3+
4+
return {
5+
presets: [
6+
["@babel/preset-env", {
7+
"useBuiltIns": "entry",
8+
"corejs": 3,
9+
"targets": "> 0.25%, not dead"
10+
}],
11+
"@babel/preset-react"
12+
],
13+
plugins: [
14+
"@babel/plugin-transform-runtime",
15+
"@babel/plugin-proposal-class-properties"
16+
]
17+
}
18+
}

index.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
"use strict";
2+
3+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4+
5+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6+
7+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8+
9+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
10+
11+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12+
13+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
14+
15+
var aliasesMap = require('./webpack.oldlibs.aliasesMap');
16+
17+
module.exports = function webpackVendors() {
18+
return _toConsumableArray(new Set([
19+
'react',
20+
'react-dom',
21+
'react-dom/server',
22+
'create-react-class',
23+
'classnames',
24+
'striptags',
25+
'lodash',
26+
'vc-cake',
27+
'pako',
28+
'base-64',
29+
'@babel/runtime/helpers/objectSpread',
30+
'@babel/runtime/helpers/defineProperty',
31+
'postcss',
32+
// 'clean-css',
33+
'immutable',
34+
'bn.js'
35+
].concat(Object.values(aliasesMap)).map(function (i) {
36+
var key = i.replace('./node_modules/', '');
37+
38+
// @babel/runtime have strictly specified exports
39+
if (key.indexOf('@babel/runtime') !== -1) {
40+
key = key.replace('/index.js', '');
41+
key = key.replace('.js', ''); // fix for 7.15.4
42+
}
43+
44+
return key;
45+
})));
46+
};

manifest.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"elements": {
3+
"vc-webpack-vendors": {
4+
"settings": {
5+
"name": "",
6+
"metaThumbnailUrl": "",
7+
"metaPreviewUrl": "",
8+
"metaDescription": ""
9+
}
10+
}
11+
}
12+
}
13+

package.json

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
{
2+
"name": "vc-webpack-vendors",
3+
"description": "This package contains Visual Composer vendors for backward compatibility and element.bundle.js vendors extracting.",
4+
"version": "2.9.3",
5+
"main": "index.js",
6+
"devDependencies": {
7+
"color-blend": "git://github.com/wpbakery/color-blend.git#5dd059a6dbdc6754f53f4eca09800953534d8322",
8+
"combokeys": "3.0.1",
9+
"event-emitter": "0.3.5",
10+
"form-serialize": "0.7.2",
11+
"immutable": "4.0.0-rc.15",
12+
"mobile-detect": "1.4.5",
13+
"node-object-hash": "2.3.10",
14+
"react-addons-shallow-compare": "15.6.3",
15+
"react-color": "2.19.3",
16+
"react-custom-scrollbars": "4.2.1",
17+
"react-datepicker": "4.2.1",
18+
"react-slick": "0.28.1",
19+
"react-sortable-hoc": "2.0.0",
20+
"react-textarea-autosize": "8.3.3",
21+
"reactcss": "1.2.3",
22+
"webfontloader": "1.6.28"
23+
},
24+
"dependencies": {
25+
"@babel/cli": "7.15.7",
26+
"@babel/core": "7.15.8",
27+
"@babel/plugin-proposal-class-properties": "7.14.5",
28+
"@babel/plugin-transform-runtime": "7.15.8",
29+
"@babel/preset-env": "7.15.8",
30+
"@babel/preset-react": "7.14.5",
31+
"@babel/register": "7.15.3",
32+
"@babel/runtime": "7.15.4",
33+
"autoprefixer": "10.3.7",
34+
"babel-eslint": "10.1.0",
35+
"babel-jest": "26.6.3",
36+
"babel-loader": "8.2.2",
37+
"base-64": "1.0.0",
38+
"buffer": "^6.0.3",
39+
"classnames": "2.3.1",
40+
"color-name": "1.1.4",
41+
"core-js": "3.18.2",
42+
"create-react-class": "15.7.0",
43+
"crypto-browserify": "^3.12.0",
44+
"css-loader": "6.3.0",
45+
"cssnano": "^5.0.8",
46+
"cypress": "5.0.0",
47+
"cypress-log-to-output": "1.1.2",
48+
"eslint": "7.32.0",
49+
"exports-loader": "3.0.0",
50+
"file-loader": "6.2.0",
51+
"fs-extra": "10.0.0",
52+
"identity-obj-proxy": "3.0.0",
53+
"jest-cli": "26.6.3",
54+
"less": "4.1.2",
55+
"less-loader": "10.0.1",
56+
"lodash": "4.17.21",
57+
"mini-css-extract-plugin": "2.4.1",
58+
"optimize-css-assets-webpack-plugin": "6.0.1",
59+
"os-browserify": "^0.3.0",
60+
"pako": "2.0.4",
61+
"path-browserify": "^1.0.1",
62+
"postcss": "8.3.9",
63+
"postcss-advanced-variables": "3.0.1",
64+
"postcss-clean": "1.2.2",
65+
"postcss-color-function": "4.1.0",
66+
"postcss-conditionals": "2.1.0",
67+
"postcss-custom-media": "8.0.0",
68+
"postcss-custom-properties": "12.0.0",
69+
"postcss-each": "1.1.0",
70+
"postcss-functions": "git://github.com/wpbakery/postcss-functions.git#8aa5a44c1c07c522f704ceaa6794b74682e444f1",
71+
"postcss-loader": "6.1.1",
72+
"postcss-math": "0.0.10",
73+
"postcss-nested": "5.0.6",
74+
"postcss-prefix-url": "git://github.com/wpbakery/postcss-prefix-url.git#60f177340ab35fce12cf4172752bd484ece3c7df",
75+
"prop-types": "15.7.2",
76+
"raw-loader": "1.0.0",
77+
"react": "17.0.2",
78+
"react-dom": "17.0.2",
79+
"react-test-renderer": "17.0.2",
80+
"standard": "16.0.4",
81+
"stream-browserify": "^3.0.0",
82+
"striptags": "3.2.0",
83+
"style-loader": "3.3.0",
84+
"svg-url-loader": "7.1.1",
85+
"terser-webpack-plugin": "5.2.4",
86+
"url-loader": "4.1.1",
87+
"util": "^0.12.4",
88+
"vc-cake": "0.9.0",
89+
"virtual-module-webpack-plugin": "0.4.1",
90+
"webpack": "5.57.1",
91+
"webpack-cli": "4.9.0",
92+
"webpack-virtual-modules": "^0.4.3"
93+
},
94+
"scripts": {
95+
"test": "webpack --version && webpack --config=./webpack.v4.config.js --progress --color",
96+
"build-dev": "babel webpack.src.config.babel.js > webpack.v4.config.js"
97+
},
98+
"resolutions": {
99+
"core-js": "3.18.2",
100+
"postcss": "8.3.9",
101+
"css-loader": "6.3.0",
102+
"color-name": "1.1.4",
103+
"eslint": "7.32.0",
104+
"less": "4.1.2",
105+
"raw-loader": "1.0.0"
106+
},
107+
"browserslist": [
108+
"ie >= 11",
109+
"last 2 version"
110+
],
111+
"repository": {
112+
"type": "git",
113+
"url": "git+https://github.com/VisualComposer/vc-webpack-vendors.git"
114+
},
115+
"keywords": [
116+
"webpack",
117+
"vendor"
118+
],
119+
"standard": {
120+
"parser": "babel-eslint",
121+
"ignore": [
122+
"public/dist/",
123+
"tests/",
124+
"**/public/js"
125+
],
126+
"rules": {
127+
"jsx-quotes": [
128+
2,
129+
"prefer-single"
130+
],
131+
"import/no-webpack-loader-syntax": "off"
132+
}
133+
},
134+
"author": "Pavel I",
135+
"license": "GPL-3.0-or-later",
136+
"bugs": {
137+
"url": "https://github.com/VisualComposer/vc-webpack-vendors/issues"
138+
},
139+
"homepage": "https://github.com/VisualComposer/vc-webpack-vendors#readme"
140+
}

vc-webpack-vendors/bold.svg

Lines changed: 5 additions & 0 deletions
Loading

vc-webpack-vendors/editor.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.css {
2+
color: red;
3+
}
4+
5+
.less {
6+
color: red;
7+
8+
h1 {
9+
padding: 10px;
10+
}
11+
12+
.autoprefixer-test {
13+
opacity: 0.1;
14+
box-shadow: 5px 5px rgba(20, 20, 20, 0.5);
15+
transition: all 1s ease-in;
16+
}
17+
}
8.91 KB
Loading

vc-webpack-vendors/index.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from 'react'
2+
// import '../builder/public/sources/less/states/common.less'
3+
// import '../builder/public/sources/less/wpbackend-switcher/init.less'
4+
// import '../builder/public/components/deactivationFeedbackPopup/deactivationFeedbackPopup.js'
5+
export default class TestVcWebpack extends React.Component {
6+
render () {
7+
// testing @babel/preset-env
8+
let map = new Map()
9+
let promise = new Promise()
10+
let json = require('./test.json')
11+
let rawAuto = require('./test-raw.raw')
12+
let rawManual = require('raw-loader!./test-raw.txt')
13+
let css = require('./test-css.css')
14+
let withSvg = require('./test-svg-in-less.css')
15+
let justSvg = require('./bold.svg')
16+
let less = require('./test-less.less')
17+
let ignoreStyleCss = require('raw-loader!./styles.css')
18+
let ignoreEditorCss = require('raw-loader!./editor.css')
19+
return <div>
20+
<span>Hello</span>
21+
</div>
22+
}
23+
}

vc-webpack-vendors/styles.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.css {
2+
color: red;
3+
}
4+
5+
.less {
6+
color: red;
7+
8+
h1 {
9+
padding: 10px;
10+
}
11+
12+
.autoprefixer-test {
13+
opacity: 0.1;
14+
box-shadow: 5px 5px rgba(20, 20, 20, 0.5);
15+
transition: all 1s ease-in;
16+
}
17+
}

vc-webpack-vendors/test-css.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.css {
2+
color: red;
3+
}
4+
5+
.less {
6+
color: red;
7+
8+
h1 {
9+
padding: 10px;
10+
}
11+
12+
.autoprefixer-test {
13+
opacity: 0.1;
14+
box-shadow: 5px 5px rgba(20, 20, 20, 0.5);
15+
transition: all 1s ease-in;
16+
}
17+
}

vc-webpack-vendors/test-less.less

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.less {
2+
@tree-tab-space: 10px;
3+
color: red;
4+
5+
h1 {
6+
padding: 10px;
7+
}
8+
9+
.autoprefixer-test {
10+
opacity: 0.1;
11+
box-shadow: 5px 5px rgba(251, 237, 237, 0.5);
12+
background: url('element-controls.png');
13+
transition: all 1s ease-in;
14+
margin: 0 ceil((@tree-tab-space / 2)) 0 floor((@tree-tab-space / 2));
15+
}
16+
}

vc-webpack-vendors/test-raw.raw

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.test {
2+
color: red;
3+
}

vc-webpack-vendors/test-raw.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.test {
2+
color: red;
3+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.test-svg {
2+
.bg {
3+
background-image: url('./bold.svg');
4+
}
5+
}

vc-webpack-vendors/test.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"test": 1
3+
}

0 commit comments

Comments
 (0)