Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Based on the grunt-typescript, but uses a seperate compilation step for each file.
Compile TypeScript
You'll need to install grunt-ts
first:
npm install grunt-ts
Then modify your grunt.js
file by adding the following line:
grunt.loadNpmTasks('grunt-ts');
Then add some configuration for the plugin like so:
grunt.initConfig({
...
ts: {
base: {
src: ['path/to/typescript/files/**/*.ts'],
dest: 'where/you/want/your/js/files',
options: {
module: 'amd', //or commonjs
target: 'es5', //or es3
base_path: 'path/to/typescript/files',
sourcemap: true,
fullSourceMapPath: true,
declaration: true,
}
}
},
...
});
If you want to create a js file that is a concatenation of all the ts file (like -out option from tsc), you should specify the name of the file with the '.js' extension to dest option.
grunt.initConfig({
...
ts: {
base: {
src: ['path/to/typescript/files/**/*.ts'],
dest: 'where/you/want/your/js/file.js',
options: {
module: 'amd', //or commonjs
}
}
},
...
});
FAQs
Compile and manage your TypeScript project
The npm package grunt-ts receives a total of 15,293 weekly downloads. As such, grunt-ts popularity was classified as popular.
We found that grunt-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.