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

getting cannot read property 'start' of undefined when running grunt-cdn #70

Open
tconroy opened this issue Jul 31, 2015 · 0 comments
Open

Comments

@tconroy
Copy link

tconroy commented Jul 31, 2015

Hey,

I may not have the plugin configured properly, so coming here for some advice.

My app directory is structured like so:

project/
    app/
    dist/
        scripts/
            - main.js
        styles/
            - main.css
        - index.html

I need to have the reference to dist/scripts/main.js & dist/styles/main.css inside of dist/index.html point to a CDN URL.

Here is my grunt-cdn config:

        cdn: {
            options: {
                cdn: '//www.my-cdn-url.com/',
                flatten: true,
                supportedTypes: {'js':'js'}
            },
            distCSS: {
                cwd: './dist/styles/',
                dest: './dist/styles/',
                src: ['./dist/index.html', '*.*.css']
            },
            distJS: {
                cwd: './dist/scripts/',
                dest: './dist/scripts/',
                src: ['./dist/index.html', '*.*.js']
            }
        }

css inside dist/index.html should point to: //www.my-cdn-url.com/styles/main.css
js inside dist/index.html should point to: //www.my-cdn-url.com/scripts/main.js

when I run the above I get the error: Warning: Cannot read property 'start' of undefined Use --force to continue.

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