Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot dojbuild that by bower_component #204

Open
jgoknowis opened this issue Apr 4, 2017 · 2 comments
Open

cannot dojbuild that by bower_component #204

jgoknowis opened this issue Apr 4, 2017 · 2 comments

Comments

@jgoknowis
Copy link

because util (dojoutil) is required in package.js:

require(['dojo-util/build/buildControl'], function (buildControl) {

client.profile.js snippet:

packages:[{
            name: 'dojo',
            location: 'src/main/webapp/bower_components/dojo'
        },{
            name: 'dijit',
            location: 'src/main/webapp/bower_components/dijit'
        },{
            name: 'dojox',
            location: 'src/main/webapp/bower_components/dojox'
        },{
            name: 'dgrid',
            location: 'src/main/webapp/bower_components/dgrid'
        },{
            name: 'dstore',
            location: 'src/main/webapp/bower_components/dstore'
        }],
@dylans
Copy link

dylans commented Apr 11, 2017

@jgoknowis could you explain in a bit more detail what steps you are taking? You are trying to do a Dojo build, and are getting the source files for dojo, dgrid, and dstore via bower, but util is not published via bower, or something else?

@jgoknowis
Copy link
Author

jgoknowis commented Apr 18, 2017

Yes getting the source files by bower.

Dojo util is not needed to require by build. The only dependency is in the package.js file from dstore. This requires dojo-util to be included.

here a snippets of the steps.

pom.xml (trigger bower and start gulp dojo build)

<execution>
    <id>bower install</id>
    <goals>
        <goal>bower</goal>
    </goals>
    <configuration>
        <arguments>install</arguments>
    </configuration>
</execution>
<execution>
    <id>gulp build</id>
    <goals>
        <goal>gulp</goal>
    </goals>
    <phase>generate-resources</phase>
</execution>

bower.json

{
  "version": "x.x.x",
  "name": "web_client",
  "appPath": "src/main/webapp/",
  "dependencies": {
    "put-selector": "0.3.6",
    "xstyle": "0.3.1",
    "dojo": "1.10.7",
    "dijit": "1.10.7",
    "dojox": "1.10.3",
    "dgrid": "1.1.0"
  }
}

gulp task:

gulp.task('dojo-build', [ 'clean-dist' ], function(cb) {
    var cmd = spawn('node', [ '../../dojo/dojo.js', 'load=build', 
            '--profile', '../../../webclient.profile.js', 
            '--releaseDir', 'target', 
            'mapPackage=build:../dojo-util/build' ], {
        stdio : 'inherit',
        cwd : buildscripts
    });

    return cmd.on('close', function(code) {
        console.log('Dojo build completed ' + (code === 0 ? 'successfully!' : 'with issues.'));
        cb(code);
    });
});

get following error in build-report.txt

processing profile resource C:/knowis/workspaces/xxx/xxx/src/main/webapp/bower_components/dgrid/package.js
info(107) Package Version: package: dstore; version: 1.1.1
Unable to retrieve packages for determining optional package support in dstore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants