localize devextreme dx-date-box Angular 2+ in custom language - devextreme-angular

I would to like localize devextreme dx-date-box in Armenian language, I'm working with devextreme-intl , I added for the devextreme grid my custom language .json file into devextreme/localization/messages but for dx-date-box I can't, could you help me how can I do it?
And please when you install node-modules, after installation change the module.exports = require("stream"); into module.exports = require("readable-stream"); the file url is node_modules/jszip/lib/readable-stream-browser.js
localizate-dx-date-box.zip
I've posted into the Github this question.
Thanks.

So I've solved the localization with custom language in my case in Armenian for whole devextreme components (including calendar dx-date-box) but with Globalize not with Intl, I've changed the location of the JSON files move it into assets/i18n and into the JSON files I've added the calendar's translating, so you need only download the project and install, npm install, I've done some changing into the configuration.
The project Angular CLI: 7.0.7 globalize-localization.zip
Add "typings.d.ts" file into the project see here
src/typings.d.ts
package.json
I've added "typings": "typings.d.ts"
tsconfig.json
add "path" like this github.com/DevExpress, some modules ("resolveJsonModule": true, "esModuleInterop": true) for using JSON files into the project.
The question is posted in the Devextreme Support Center
devexpress.com/Support/Center/Question

Related

webpack.config.js and vue.config.js

I am new to vue and I started a project from scratch.
I needed to install vuetify. However, I realized that I do not have webpack.config.js and vue.config.js.
Do I need to install it using npm or can I just directly make these config files manually?
Can help me how do I add this config files?
If you created your app with the cli, until you want to add your custom config, you do not need to add those files.
If you need to add your custom configurations for webPack, you can manually create a vue.config.js and put there the setting for webPack, as explained in detail here.

how webpack builds vue.js project

My question is related to webpack. Let's say I'm using webpack and vue.js project. How does webpack build the project when I run the npm run build. I know that there's a build folder where config files have to be added and there'll be output folder dist which will save my final project.
Question 1) WHat does webpack do? Does it search entry point in config file so that it knows where to start building process from? for vue.js it's src/main.js. AM I right?
QUestion 2) when it finds main.js, what does it do? does it go from main.js to top so that to find all the dependencies ?
QUestion 3) Let's say IT found a .vue file. what does it do? does it seperate js code - put it into some other js file, then seperate css and put it into some other css file? or just take the whole .vue code and puts it into js file(with all its html and so on)?
QUestion 4) Just need that line of code what it looks to show me QUestion 3) answer.
Yes, webpack has an entry point (entry section from config). It's not src/main.js exactly, it's configurable.
It builds a dependency tree starting from an entry point.
It will be handled with loaders in the sequence you provided. Usually, it's vue-loader which transforms vue files to js, next it goes to babel-loader which transpiles your js dialect (Flow/ES6/ES2017/TS) to ES5, next ot js-loader which can finally split all the code to dependencies and continue loading.
CSS separation can be done with webpack plugins like ExtractTextWebpackPlugin and then your css dialect (LESS/SASS/PostCSS, etc) will be transformed with loaders, i.e. sass-loader, css-loader, style-loader.
When styles extraction plugin is not present, it will distribute css along with js and put it to the head styles.

Vuepress inside and integrated with Vue project

I´m starting with Vuepress (https://vuepress.vuejs.org), and i´d followed the docs to integrate it with an existing project (https://vuepress.vuejs.org/guide/getting-started.html#inside-an-existing-project). I used the sugested docs directory.
But now i need to "really" integrate with my project and i need to when my users access the my-project.com/docs, to reach the Vuepress docs
If i make (yarn docs:build), the /dist folder will be generated to be used anywhere as a statics HTML files. I tought in put the /dist/ content in the /static/ files of my project. But the vue-router response to /docs is a 404.
And i will still need to make 2 builds, my project and the docs.
The questions are:
How can i make the vue-router "see" the vuepress build files? Where to put them?
How can i integrate the run build of project to make them both?
I have 2 projects, one with quasar and the other i´m using vue-cli 3.
Thank you all.
How can i make the vue-router "see" the vuepress build files? Where to put them?
You don't, it's basically an external link. A simple <a href="/docs"> should be sufficient.
How can i integrate the run build of project to make them both?
You don't, you add a new task that does them both.
// package.json
{
"scripts": {
"build-project": "node build-project.js"
}
}
from a terminal
# yarn run build-project
I think maybe the point problem is to solve the Vue-Router to make the vue-router don't handle the link when we external link the /docs as like.

Where to execute npm install commands to include files in .net project directly

I have recently included Angular 2 in my project. After setup, facing issue for namespace webdriver. On Google I found the solution here. But here it is asking to execute below npm command.
npm install #types/selenium-webdriver#2.53.36 --save-dev
Now, I want to know, where I will execute this above command, so that the required files will get included in my project.
Inside the VS IDE, I haven't found any console area like as for nuget, where I execute the command and files get included in project.
Please help.
add a nmp configuration file
add all of the #angular dependencys that you will be needing
add system.config file in the root of the project
add tsconfig.json to the root of the project
add tslint.json to root of project
then add your app.component .module .route and other files.
in system.config.js add your #angular/core and others like
'#angular/core': 'npm:#angular/core#2.1.1/bundles/core.umd.js'
after doing this your can run your project and your _layout page is where you will add all of your <script> and other angular files.

How to load a bootstrap js file in my case?

I have a question regarding loading the dependencies using Bower.
I have bower.json like
{
"name": "My project",
"version": "0.1",
"dependencies": {
"angular": "~1.2.0",
"angular-bowser": "~0.0.1"
}
}
//I want to add alert.js dependency
I was hoping to add a custom bootstrap JS file that is only for alert. I am not sure how to add the custom file since I can't run bower install to install the custom file.
Any tips? Thanks a lot!
You add bootstrap as a Bower dependency. Then in whatever other tool you're using to either generate <script> tags or generate a single concatenated JS file, you add Bootstrap's alert.js (and any other Bootstrap jQuery plugins that Alert depends on) to the list of required JS files.
Speaking more generally, Bower is an pretty minimalistic package manager, to the point that it is arguably not very useful, as it provides relatively little metadata and leaves many issues to instead be dealt with by other tools or by the user manually. Hence, what you're asking for here goes beyond the realm of Bower itself.