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

google-code-prettify isn't being added to the global variables #63

Open
lookfirst opened this issue Nov 1, 2014 · 3 comments
Open

google-code-prettify isn't being added to the global variables #63

lookfirst opened this issue Nov 1, 2014 · 3 comments

Comments

@lookfirst
Copy link

I've installed via bower: "google-code-prettify": "~1.0.3",

When I run things through amdclean, this is the only module that isn't being found.

I can see that the require('google-code-prettify') gets converted to just a variable of 'google_code_prettify;', but this variable isn't referenced at the top of the file like the other requires are.

Here is how I'm using amdclean (and the hacky workaround for now):

    requirejs.optimize({
        name: 'main'
        baseUrl: "#{JS_DIR}"
        mainConfigFile: "#{JS_DIR}/main.js"
        out: "#{DEPLOY_APP_DIR}/main.js"
        optimize: 'none'
        onModuleBundleComplete: ((data) ->

            cleaned = amdclean.clean({
                transformAMDChecks: true
                filePath: "#{DEPLOY_APP_DIR}/main.js"
                wrap: {
                    start: '(function() { var google_code_prettify; '
                    end: '}());'
                }
            })

            fs.writeFile("#{DEPLOY_APP_DIR}/main.js", cleaned, cb)
        )
    })

@gfranko
Copy link
Owner

gfranko commented Nov 18, 2014

Could you send the entire module code/codebase that you are using with the require('google-code-prettify') so that I can debug more?

@lookfirst
Copy link
Author

Sorry for the long delay. I setup a small project to show you how this bug happens.

https://gist.github.com/lookfirst/64def911d1a9083a2643

It is uploaded to the gist as a .zip file (sorry, github doesn't allow attaching files to issues).

  1. unzip it
  2. npm install
  3. ./node_modules/.bin/gulp heroku
  4. ctrl-c

Look at target/app/main.js. You'll notice that google_code_prettify isn't added to the list of variables on line 6.

@gfranko
Copy link
Owner

gfranko commented Dec 6, 2014

I'll make sure to figure this out soon.

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