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

Location of almond.js is critical to the build process? #98

Open
crishushu opened this issue Jan 6, 2015 · 0 comments
Open

Location of almond.js is critical to the build process? #98

crishushu opened this issue Jan 6, 2015 · 0 comments

Comments

@crishushu
Copy link

Thanks for your answer here!

Thereafter I was stumbling over this case, where the build process behaves as expected only if almond.js exists in example-project/src/almond.js and is used together with the corresponding pointer to the almond module name: '../almond' inside the build config file. The generated file example-project/www/almond.js contains the content of main.jswith all its dependencies.

Though what is wrong with the following setting? It does not write out any compressed file.

tree structure:

|── example-project/
|   |–– build-config.js
|   |–– node_modules/
|   |   |–– almond/
|   |   |   |–– almond.js
|   |–– src/
|   |   |–– index.html
|   |   |–– example-frag.js
|   |   |–– core/
|   |   |   |–– main.js
|   |   |   |–– other.js

build config file:

({
    baseUrl: 'core',
    appDir: 'src',
    dir: 'www',
    name: 'node_modules/almond/almond',
    insertRequire: ['main'],
    include: ['main'],
    optimize: 'uglify2',
    preserveLicenseComments: false,
    generateSourceMaps: true,
    skipDirOptimize: true,
    removeCombined: true,
    wrap: {
        startFile: 'src/example-frag.js'
    },
    paths: {        
        main: 'main',
        other: 'other'
    }
})

BTW using out: instead dir: just works fine regardless where almond.js is located.

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

1 participant