Project/
dub.sdl/
source/
examples/
test/
source/
app.d
dub.sdl
Project/dub.sdl
...
subpackage "./examples/test"
...
Project/examples/test/dub.sdl
name "test"
targetType "executeable"
If I try to execute dub run test if get the following error
Failed to parse package description for test in Project/examples/test.
Failed to find a package named 'test'.
The same happens if I try to execute dub run :test.
In the command, you should prefix the subpackage name with the root package name.
dub run rootpackagename:test
It appears you need to specify run (or build or some other command) explicitly).
As of year 2017 with dub version 1.3.0: <rootpackagename> is optional. For example, I was testing jsoniopipe package as following:
# Add dependency which is not found on dub's repo:
git clone https://github.com/schveiguy/iopipe ../iopipe
dub add-local ../iopipe
dub.sdl file:
name "jsoniopipe"
description "JSON parser for iopipe"
authors "Steven Schveighoffer"
copyright "Copyright © 2017, Steven Schveighoffer"
license "boost"
targetType "library"
dependency "iopipe" version="*"
subPackage {
name "formatjson"
targetType "executable"
sourcePaths "examples/formatjson"
dependency "jsoniopipe" version="*"
}
Content of testjson.json
{
"name": "myproject",
"authors": [
"My Name"
],
"description": "My first project",
"copyright": "Copyright © 2017, imadev",
"license": "Boost"
}
Run command:
dub run :formatjson -- ./testjson.json
Related
I have configured some tasks for CMake in Visual studio. One of the commands to execute includes the ${relativeFile} and it is under subdirectory. The fetched result is not including the '/' to separate the directories.
Here is the tasks.vs.json file sample:
{
"taskName": "TestTask",
"appliesTo": "*/",
"type": "remote",
"remoteWorkingDirectory": "/home/root/",
"contextType": "custom",
"localCopyDirectory": "${workspaceRoot}\\..\\build\\${env.name}\\bin",
"remoteMachineName": "${env.TARGET_MACHINE}",
"remoteCopyMethod": "sftp",
"remoteCopyDirectory": "/tmp/",
"command": "echo changing permissions for ${relativeFile}",
"args": ""
}
Expected result: changing permissions for test\test1
Current Result: changing permissions for testtest1
Am using Amcharts4 in angular7 project . After build Vendor.js is 14MB in Size .So load time of the page is taking about 17 seconds .
I saw files like pdfmaker.js 2.54 MB and xlxs.js file of 2MB in dist folder which are related to amcharts .
I don't want those files in dist folder . Or is there any way to reduce the vendor.js file size.
or
how can i exclude unnecessary files form amcharts4.
As i did some R&D work where i kept below line of code in package.json file
"build": "ng build --prod --aot false --build-optimizer false",
But no use .
After ng-install in package-lock.json file i can see below dependencies
"dependencies": {
"#amcharts/amcharts4": {
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/#amcharts/amcharts4/-/amcharts4-4.5.2.tgz",
"integrity": "sha512-oNK5l73DI61svCUYpmU6YfAB6mlJPmaeLeQceOHOVi4MpYpjUSrghX7lS5HzoNASEa1BtEKjauCAbQ2s8z3b0g==",
"requires": {
"#types/regression": "^2.0.0",
"canvg": "^1.5.3",
"css-element-queries": "^1.0.5",
"d3-force": "^2.0.1",
"d3-geo": "^1.11.3",
"d3-geo-projection": "^2.6.0",
"pdfmake": "^0.1.36",
"polylabel": "^1.0.2",
"regression": "^2.0.1",
"tslib": "^1.9.3",
"xlsx": "^0.12.8"
}
},
How Can to exclude "pdfmake": "^0.1.36", "xlsx": "^0.12.8" these dependencies from amharts4 in angular7
Use ngx-build-plus to extend the Angular CLI's default build behavior without ejecting.
I have a django blog project, and am trying to use bower to manage my packages.
When running 'gulp' from my console, I get the following error :
(py3) ➜ nomadpad git:(master) ✗ gulp
[15:16:15] Using gulpfile ~/code/nomadpad/gulpfile.js
[15:16:15] Starting 'css'...
[15:16:16] Finished 'css' after 1.23 s
[15:16:16] Starting 'html'...
[15:16:16] Finished 'html' after 3.38 ms
[15:16:16] Starting 'scripts'...
[15:16:16] Finished 'scripts' after 4.43 ms
[15:16:16] Starting 'default'...
[15:16:16] Finished 'default' after 38 μs
events.js:182
throw er; // Unhandled 'error' event
^
CssSyntaxError: /Users/davidmellor/code/nomadpad/bower_components/jquery/dist/jquery.js:756:9: Unknown word
at Input.error (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/input.js:119:22)
at Parser.unknownWord (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/parser.js:506:26)
at Parser.other (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/parser.js:171:18)
at Parser.parse (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/parser.js:84:26)
at parse (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/parse.js:24:16)
at new LazyResult (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/lazy-result.js:70:24)
at Processor.process (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/processor.js:117:12)
at /Users/davidmellor/code/nomadpad/node_modules/gulp-postcss/index.js:51:12
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
My bower.json in the root folder looks like this :
{
"name": "blog_postcssgulp",
"description": "",
"main": "gulpfile.js",
"authors": [
"DMells <dave#davemellor.com>"
],
"license": "ISC",
"homepage": "https://github.com/DMells/nomadpad",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "^3.3.1",
"modernizr": "^3.5.0"
}
}
I'm not sure what to do here, please can anyone assist?
Many thanks
If anyone else comes across this, I found the solution by removing my bower_components folder and then reinstalling bower, as well as the jquery package.
npm install bower --save-dev
And then the jquery package:
bower install jquery --save-dev
I installed grunt-text-replace with npm install grunt-text-replace --save-dev command and add grunt.loadNpmTasks('grunt-text-replace'); to gruntfile.js and add write this:
replace: {
example: {
src: ['css/mystyle.css'],
overwrite: true,
replacements: [{
from: 'wizard', // string replacement
to: 'wizardstep'
}]
}
}
then run grunt replace in command line and after that show me done, without error but my replacement doesn't work and applied.
Unfortunately I entered path incorrectly and other hand grunt-text-replace doesn't show me message if source file path incorrect.
just I correct source path
I am using ExtJS 4.1 and I am deploying my simple HelloExt program on GlassFish V3.1.
I am trying to create a build from Sencha SDK.
I have used the following two commands...
C:\>sencha create jsb -a http://localhost:8080/HelloExt/index.jsp -p appname.jsb
3 -v
C:\>sencha build -p appname.jsb3 -v -d .
As per the documentation, it will create app-all.js file. But where does it create the file?
How can I know IF build are created successfully or not?
Where are the generated JS files?
I made a search but I can not found anything like app-all.js.
For more information:
I am using JDK 1.6.0_12 and GlassFish V3.1 application server.
Here are the edited content of the question ....
And when I am trying to use the sencha SDK, It generates a .dpf file into the class path.
The contents of the .dpf file as as below ...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<context-root>/HelloExt</context-root>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>
Can anyone tell me Why here it generated .DPF file ? Why its not generating the app-all.js file ?
Try running the command from inside the app root directory and then using a relative path:
0) open cmd window
1) run in cmd window: "cd C:\[webserver_webapp_root]\[app_name]"
In other words change the cmd directory to the app root. Fill in the bracketed text above with the correct paths.
2) run in cmd window: "sencha create jsb -a index.html -p app.jsb3 -v"
The app.jsb3 should be created in your app's root directory (C:\[webserver_webapp_root]\[app_name]). Open it up and make sure it contains all of your app classes, it should look something like this:
{
"projectName": "Project Name",
"licenseText": "Copyright(c) 2012 Company Name",
"builds": [
{
"name": "All Classes",
"target": "all-classes.js",
"options": {
"debug": true
},
"files": [
{
"clsName": "YourApp.view.Viewport",
"name": "Viewport.js",
"path": "app/view/"
},
// plus ALOT more classes...
]
},
{
"name": "Application - Production",
"target": "app-all.js",
"compress": true,
"files": [
{
"path": "",
"name": "all-classes.js"
},
{
"path": "",
"name": "app.js"
}
]
}
],
"resources": []
}
If everything looks fine then you can go onto the next step, if not then there is something wrong with your app directory structure and you need to fix it per Sencha recommended ExtJS application architecture.
You can also use any error messages to help identify the problem.
3) update placeholders ("Project Name", etc) at the top of app.jsb3
4) run in cmd window: "sencha build -p app.jsb3 -d . -v"
The app-all.js file should also be created in the app's root directory. If the cmd window doesn't give any errors before it says "Done Building!" then you are all done. You can now change your index.html script link to point to app-all.js instead of app.js.
If there are errors then you have to fix those and run this again.
Other things you can try:
In response to your last comment, your -p switch parameter should be a jsb3 file not jsb.
Make sure that the web server is running and that your app runs without any errors before you try to use the SDK Tools.
Then try these:
C:\Projects\HelloExt\build\web>sencha create jsb -a index.jsp -p HelloExt.jsb3 -v
C:\Projects\HelloExt>sencha create jsb -a index.jsp -p HelloExt.jsb3 -v
C:\>sencha create jsb -a [actual IP address]:8080/HelloExt/index.jsp -p HelloExt.jsb3 -v
Fill in your actual IP address where the brackets are (not localhost).
This should produce the jsb3 file shown in #2 above then you can move on to step #3 above.