nativescript-timedatepicker
nativescript-timedatepicker copied to clipboard
Not compatible with webpack v0.9.0
I guess it is due to the new AngularCompilerPlugin (angular/angular-cli/issues/8284), deleting all the ts files under node_modules/nativescript-timedatepicker folder solved the issue Or alternatively can add those files into include section of tsconfig.json.
Please exclude ts files during release, that will solve this issue.
As a follow up to @manojdcoder answer: Until this plugin gets updated I just added a before prepare hook which deleted relevant files, to avoid situation where plugin would be reinstalled:
var fs = require('fs');
module.exports = function($logger) {
var pickerAndroidTsFile = 'node_modules/nativescript-timedatepicker/timedatepicker-handler.android.ts';
var pickerIosTsFile = 'node_modules/nativescript-timedatepicker/timedatepicker-handler.ios.ts';
console.log('GetAlert BeforePrepare Hook: modify existing plugins');
if (fs.existsSync(pickerAndroidTsFile)) {
fs.unlink(pickerAndroidTsFile);
}
if (fs.existsSync(pickerIosTsFile)) {
fs.unlink(pickerIosTsFile);
}
};
@AntonioCuevaUrraco does this plugin still gets maintained or do we have to create our own fork?
@RaphaelJenni I stop using NS a year ago. I think you can take this project as a contributor or create your own to update as more breaking changes come
As a follow up to @manojdcoder answer: Until this plugin gets updated I just added a before prepare hook which deleted relevant files, to avoid situation where plugin would be reinstalled:
var fs = require('fs'); module.exports = function($logger) { var pickerAndroidTsFile = 'node_modules/nativescript-timedatepicker/timedatepicker-handler.android.ts'; var pickerIosTsFile = 'node_modules/nativescript-timedatepicker/timedatepicker-handler.ios.ts'; console.log('GetAlert BeforePrepare Hook: modify existing plugins'); if (fs.existsSync(pickerAndroidTsFile)) { fs.unlink(pickerAndroidTsFile); } if (fs.existsSync(pickerIosTsFile)) { fs.unlink(pickerIosTsFile); } };
This should be saved in both before-prepare and before-watch folders for Nativescript 5
for the record, unlink needs a callback..
var fs = require('fs');
module.exports = function($logger) {
var pickerAndroidTsFile = 'node_modules/nativescript-timedatepicker/timedatepicker-handler.android.ts';
var pickerIosTsFile = 'node_modules/nativescript-timedatepicker/timedatepicker-handler.ios.ts';
console.log('GetAlert BeforePrepare Hook: modify existing plugins');
if (fs.existsSync(pickerAndroidTsFile)) {
fs.unlink(pickerAndroidTsFile,(err) => {
if (err) throw err;
});
}
if (fs.existsSync(pickerIosTsFile)) {
fs.unlink(pickerIosTsFile,(err) => {
if (err) throw err;
});
}
};