-
-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
82b4fd5
to
3591fc6
Compare
index.js
Outdated
throw new Error("app/package.json must contain a `main` attribute."); | ||
exports.getAotEntryModule = function (appDirectory = APP_DIR) { | ||
const entry = getPackageJsonEntry(appDirectory); | ||
const aotEntry = `${entry}.aot.ts`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the entry point need to be .ts
💭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, the Angular compiler needs a ts
file.
lib/compiler.js
Outdated
} | ||
|
||
function getProjectDir($projectData) { | ||
const projectDir = safeGet($projectData, "projectDir"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is necessary - CLI's $projectData
always has projectDir
property - if it doesn't the initial creation of the $projectData
class would have failed long before we get here
projectHelpers.js
Outdated
@@ -3,6 +3,10 @@ const fs = require("fs"); | |||
const semver = require("semver"); | |||
const { EOL } = require("os"); | |||
|
|||
const { getProjectData, PROJECT_DATA_GETTERS } = require("./nsCliHelpers"); | |||
|
|||
const APP_DIR = "app"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can reuse this constant here
👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks okay to me, but instead of setting INIT_CWD
you can try using the latest version of nativescript-hook
(0.2.3). This can be handled in a separate PR, as discussed offline
NativeScriptModule
ee05e7a
to
3ef11ec
Compare
test |
1 similar comment
test |
test |
sourceDir
andappResourcesDir
when starting webpack from theprojectData
service.sourceDir
andappResourcesDir
in webpack configs from env object.appPath
value from the project data. Defaults toapp
.getEntryModule
.resolves #436