克隆后如何从源代码构建primeng

时间:2019-06-07 03:31:53

标签: angular build compilation angular-cli primeng

在检查了angular-cli的文档后,我有点努力从源代码构建primeng(破坏者:没有帮助,他们没有遵循标准) 我尝试了所有这些

JsonUtility.FromJsonOverwrite(jsonString, jsonObject);

然后阅读代码,以及一些论坛问题,我发现了以下内容

2 个答案:

答案 0 :(得分:0)

以下是步骤:

ng build
ng build -c production
... --aot
... --prod
...

您可以在github上创建一个发行版,并使用package.json中的URL而不是版本号对其进行引用: 例如:gulp clean gulp build-assets gulp build-exports tsc --build tsconfig-release.json npm pack ...

答案 1 :(得分:0)

构建过程已更改为在primeng 9中使用std::wstring toWString(const YourStringType &str) { const char pStr = ... pointer to str's characters ...; int sLen = ... length of str in chars, not counting the null terminator ...; std::wstring ws; int wLen = MultiByteToWideChar(CP_ACP, 0, pStr, slen, NULL, 0); if (wLen > 0) { ws.resize(wLen); MultiByteToWideChar(CP_ACP, 0, pStr, sLen, ws.data(), wLen); } return ws; } std::string toString(const wchar_t *ws) { std::string s; int wLen = lstrlenW(s); int sLen = WideCharToMultiByte(CP_ACP, 0, ws, wLen, NULL, 0, NULL, NULL); if (sLen > 0) { s.resize(sLen); WideCharToMultiByte(CP_ACP, 0, ws, wLen, s.data(), sLen, NULL, NULL); } return s; } IShellItem* toShellItem(const YourStringType &path) { IShellItem *pItem = NULL; if (FAILED(SHCreateItemFromParsingName(toWString(path).c_str(), NULL, IID_PPV_ARGS(&pItem)))) pItem = NULL; return pItem; } bool wvFM::SelectFileSystemObjectDialogTree(const WCDialogCreationOptions& in_options, WCDialogReply& out_Reply) { AUTO_FUNC_DEBUG; out_Reply.accept = false; if (in_options.m_flags[WCDialogCreationOptions::eSelectFolder]) { IFileOpenDialog *pFileOpen = NULL; if (FAILED(CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_ALL, IID_PPV_ARGS(&pFileOpen)))) return false; FILEOPENDIALOGOPTIONS opts = 0; pFileOpen->GetOptions(&opts); pFileOpen->SetTitle(toWString(in_options.m_windowTitle).c_str()); pFileOpen->SetOptions(opts | FOS_PICKFOLDERS); IShellItem *pItem = toShellItem(in_options.m_InitialDir); if (pItem) { pFileOpen->SetFolder(pItem); pItem->Release(); } HWND hwndOwner = (HWND) in_options.m_owner; HRESULT hr = pFileOpen->Show(hwndOwner); ::SetFocus(hwndOwner); if (SUCCEEDED(hr)) { if (SUCCEEDED(pFileOpen->GetResult(&pItem))) { PWSTR pszFilePath; if (SUCCEEDED(pItem->GetDisplayName(SIGDN_FILESYSPATH, &pszFilePath))) { out_Reply.m_filePathRef = wvFM::WCStPath(toString(pszFilePath).c_str()); out_Reply.accept = true; CoTaskMemFree(pszFilePath); } pItem->Release(); } } pFileOpen->Release(); return true; } ... } 。该方法已在primeng 10中得到确认。要构建:

ng-packagr

我还没有使用npm install ng-packager --save-dev npm run build-lib 构建版本9。根据此link应该相同。