-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from flotiq/feature/24775-remove-bash-scripts
#24775 changed bash scripts to js scripts
- Loading branch information
Showing
7 changed files
with
60 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
flotiqApi | ||
flotiqApiBuildJs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const fce = require('fs-extra'); | ||
const {execSync} = require('child_process'); | ||
const buildToJs = (outputPath) => { | ||
|
||
// fce.mkdirp('flotiqApiBuildJs').then().catch(err => err && console.error(err)); | ||
execSync('tsc -p ./flotiqApi', {stdio: 'ignore'}); | ||
|
||
fce.moveSync('flotiqApi/dist/', 'flotiqApiBuildJs', {overwrite: true}); | ||
|
||
fce.removeSync('flotiqApi'); | ||
fce.moveSync("flotiqApiBuildJs", outputPath, {overwrite: true}); | ||
} | ||
|
||
module.exports = buildToJs; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const glob = require('glob'); | ||
|
||
const filePatterns = ['src/models/*WithoutInternal.ts', 'src/models/*WithoutRequired.ts']; | ||
const deleteLine = "import { DataSource, DataSourceFromJSON } from './DataSource';"; | ||
|
||
const cleanDuplicateImport = (cwd) => { | ||
filePatterns.forEach((pattern) => { | ||
const files = glob.sync(pattern, {cwd: cwd}); | ||
files.forEach(file => { | ||
const filePath = path.join(cwd, file); | ||
const data = fs.readFileSync(filePath, 'utf8'); | ||
if (data.includes(deleteLine)) { | ||
const newData = data.replace(deleteLine, ''); | ||
fs.writeFileSync(filePath, newData, 'utf8'); | ||
} | ||
}); | ||
}) | ||
} | ||
module.exports = cleanDuplicateImport; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters