mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
fix(build): copy index.d.ts before publish
This commit is contained in:
17
packages/core/scripts/publish.js
Normal file
17
packages/core/scripts/publish.js
Normal file
@ -0,0 +1,17 @@
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
|
||||
var DIST = path.join(__dirname, '../dist/collection');
|
||||
var SRC = path.join(__dirname, '../src');
|
||||
var INDEX_JS_DIST = path.join(DIST, 'index.js');
|
||||
var INDEX_DTS_SRC = path.join(SRC, 'index.d.ts');
|
||||
var INDEX_DTS_DIST = path.join(DIST, 'index.d.ts');
|
||||
|
||||
console.log('publish: create', INDEX_JS_DIST);
|
||||
fs.writeFileSync(INDEX_JS_DIST, '');
|
||||
|
||||
|
||||
console.log('publish: create', INDEX_DTS_DIST);
|
||||
var srcIndexDTS = fs.readFileSync(INDEX_DTS_SRC, 'utf-8');
|
||||
fs.writeFileSync(INDEX_DTS_DIST, srcIndexDTS);
|
Reference in New Issue
Block a user