Skip to content

Commit cec6783

Browse files
committed
提出css 方便npm项目使用,npm项目增加dist文件夹
1 parent 1705718 commit cec6783

36 files changed

+1526
-1346
lines changed

build/publish.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
var fs = require('fs');
2+
var path = require('path');
3+
var key = process.argv[2] ? process.argv[2].replace("--", "") : "leaflet";
4+
var filePath = path.join(__dirname, "../dist");
5+
var destDir = path.join(__dirname, "../src/" + key + "/dist");
6+
if (!fs.existsSync(destDir)) {
7+
fs.mkdirSync(destDir);
8+
}
9+
fs.readdir(filePath, function (err, files) {
10+
if (err) {
11+
console.log(err);
12+
return;
13+
}
14+
files.forEach(function (fileName) {
15+
16+
if (fileName.indexOf(key) >= 0 && fileName.indexOf("include") == -1) {
17+
var sourceFile = path.join(__dirname, "../dist", fileName);
18+
var destPath = path.join(__dirname, "../src/" + key + "/dist", fileName);
19+
var readStream = fs.createReadStream(sourceFile);
20+
var writeStream = fs.createWriteStream(destPath);
21+
readStream.pipe(writeStream);
22+
}
23+
})
24+
})

dist/iclient9-leaflet.js

Lines changed: 551 additions & 485 deletions
Large diffs are not rendered by default.

dist/iclient9-leaflet.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iclient9-mapboxgl.js

Lines changed: 292 additions & 309 deletions
Large diffs are not rendered by default.

dist/iclient9-mapboxgl.min.css

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iclient9-mapboxgl.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iclient9-openlayers.js

Lines changed: 440 additions & 439 deletions
Large diffs are not rendered by default.

dist/iclient9-openlayers.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/include-leaflet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
inputScript("http://iclient.supermap.io/web/libs/deck.gl/5.1.3/deck.gl.js");
6565
}
6666
if (!inArray(excludes, 'iclient9-leaflet')) {
67-
inputScript("../../dist/iclient9-leaflet.min.js");
67+
inputScript("../../dist/iclient9-leaflet.js");
6868
}
6969
if (inArray(includes, 'iclient9-leaflet-css')) {
7070
inputCSS("../../dist/iclient9-leaflet.min.css");

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
"scripts": {
1212
"lint": "eslint src",
1313
"release": "npm run release-leaflet && npm run release-openlayers && npm run release-mapboxgl && npm run release-classic",
14-
"release-leaflet": "webpack ./src/leaflet/index.js --config ./build/webpack.config.leaflet.js --color && npm run compress-leaflet",
15-
"release-openlayers": "webpack ./src/openlayers/index.js --config ./build/webpack.config.openlayers.js --color && npm run compress-openlayers",
16-
"release-mapboxgl": "webpack ./src/mapboxgl/index.js --config ./build/webpack.config.mapboxgl.js --color && npm run compress-mapboxgl",
17-
"release-classic": "webpack ./src/classic/index.js --config ./build/webpack.config.classic.js --color && npm run compress-classic",
14+
"release-leaflet": "npm run deploy-leaflet ./src/leaflet/index.js ./src/leaflet/css/index.js && npm run compress-leaflet",
15+
"release-openlayers": "npm run deploy-openlayers ./src/openlayers/index.js ./src/openlayers/css/index.js && npm run compress-openlayers",
16+
"release-mapboxgl": "npm run deploy-mapboxgl ./src/mapboxgl/index.js && npm run compress-mapboxgl",
17+
"release-classic": "npm run deploy-classic ./src/classic/index.js && npm run compress-classic",
1818
"deploy": "webpack --color",
1919
"deploy-leaflet": "webpack --config ./build/webpack.config.leaflet.js --color",
2020
"deploy-openlayers": "webpack --config ./build/webpack.config.openlayers.js --color",
2121
"deploy-mapboxgl": "webpack --config ./build/webpack.config.mapboxgl.js --color",
2222
"deploy-classic": "webpack --config ./build/webpack.config.classic.js --color",
2323
"compress-openlayers": "uglifyjs --comments /Copyright©/i -c -m -o ./dist/iclient9-openlayers.min.js -- ./dist/iclient9-openlayers.js && cleancss -o ./dist/iclient9-openlayers.min.css ./dist/iclient9-openlayers.css",
2424
"compress-leaflet": "uglifyjs --comments /Copyright©/i -c -m --ie8 -o ./dist/iclient9-leaflet.min.js -- ./dist/iclient9-leaflet.js && cleancss -o ./dist/iclient9-leaflet.min.css ./dist/iclient9-leaflet.css",
25-
"compress-mapboxgl": "uglifyjs --comments /Copyright©/i -c -m -o ./dist/iclient9-mapboxgl.min.js -- ./dist/iclient9-mapboxgl.js",
25+
"compress-mapboxgl": "uglifyjs --comments /Copyright©/i -c -m -o ./dist/iclient9-mapboxgl.min.js -- ./dist/iclient9-mapboxgl.js && cleancss -o ./dist/iclient9-mapboxgl.min.css ./dist/iclient9-mapboxgl.css",
2626
"compress-classic": "uglifyjs --comments /Copyright©/i -c -m -o ./dist/iclient-classic.min.js -- ./dist/iclient-classic.js",
2727
"package": "node ./build/pack.js",
2828
"package-debug": "node ./build/pack.js - debug",
@@ -34,7 +34,8 @@
3434
"build-docs-openlayers": "jsdoc -c ./build/jsdocs/openlayers/docs.json -R ./build/jsdocs/openlayers/index.md",
3535
"build-docs-mapboxgl": "jsdoc -c ./build/jsdocs/mapboxgl/docs.json -R ./build/jsdocs/mapboxgl/index.md",
3636
"build-docs-classic": "jsdoc -c ./build/jsdocs/classic/docs.json -R ./build/jsdocs/classic/index.md",
37-
"release-publish": "cd ./src/common && npm publish && cd ../leaflet && npm publish && cd ../openlayers && npm publish && cd ../mapboxgl && npm publish && cd ../classic && npm publish"
37+
"prepublish": "node ./build/publish.js --leaflet && node ./build/publish.js --openlayers && node ./build/publish.js --mapboxgl && node ./build/publish.js --classic",
38+
"publish": "npm run prepublish && cd ./src/common && npm publish && cd ../leaflet && npm publish && cd ../openlayers && npm publish && cd ../mapboxgl && npm publish && cd ../classic && npm publish"
3839
},
3940
"keywords": [
4041
"SuperMap",
@@ -99,8 +100,8 @@
99100
"@mapbox/vector-tile": "1.3.0",
100101
"@supermap/iclient-common": "file:src/common",
101102
"@turf/turf": "^4.7.1",
102-
"echarts": "4.0.4",
103103
"deck.gl": "5.1.3",
104+
"echarts": "4.0.4",
104105
"elasticsearch": "13.0.1",
105106
"express": "^4.16.3",
106107
"fetch-ie8": "^1.5.0",
@@ -110,11 +111,11 @@
110111
"lodash.topairs": "^4.3.0",
111112
"mapbox-gl": "0.43.0",
112113
"mapv": "2.0.14",
114+
"ol-mapbox-style": "^2.11.2",
113115
"openlayers": "^4.6.4",
114116
"pbf": "3.0.2",
115117
"proj4": "2.3.15",
116118
"promise-polyfill": "^6.0.2",
117-
"ol-mapbox-style": "^2.11.2",
118119
"three": "^0.90.0"
119120
}
120121
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy