Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

Fountain-Angular1 Gulp tasks add an extra /src/ directory during build, breaking local copy of the app #68

Closed
msholly opened this issue Oct 23, 2016 · 10 comments

Comments

@msholly
Copy link

msholly commented Oct 23, 2016

Hi everyone,

Didn't see anyone on Slack so I'll open a issue here. I'm having a problem with Gulp-inject I believe. I just grabbed a brand new install of this generator, and during

npm run serve

The files get copied to .tmp as intended, but then another "src" directory is added before the app's code.

fountain-angular1/.tmp/src/index.html

instead of

fountain-angular1/.tmp/index.html

Upgrading and downgrading gulp versions appear to have no affect. Changing the gulp tasks, I can get one or two files in the correct directory, but the structure gets flattened. That issue is mostly my inexperience with gulp task writing, but out of the box the issue remains.

This issue is affecting an Angular app in active development as well as a brand new Yo. This leads me to believe some dependency got updated, and now needs a new "Base" attribute to SOME gulp task or pipe. Oddly, a prototype app from a few months ago builds just fine. Copy the whole project to another folder on my machine, install and build it - and the new "/src" issue appears. No changes to package.json.

Here's my .yo-rc.json as requested.

{
  "generator-fountain-angular1": {
    "version": "0.6.0",
    "props": {
      "resolved": "C:\\Users\\Mechau\\AppData\\Roaming\\npm\\node_modules\\generator-fountain-angular1\\generators\\app\\index.js",
      "namespace": "fountain-angular1:app",
      "argv": {
        "remain": [],
        "cooked": [],
        "original": []
      },
      "skip-cache": false,
      "skip-install": false,
      "framework": "angular1",
      "modules": "inject",
      "css": "scss",
      "js": "babel",
      "sample": "hello",
      "router": "uirouter"
    }
  }
}

Node,js v5.11.0 and win32 10.0.14393, yo version 1.8.5, npm version 3.10.9

Thanks everyone!

@msholly
Copy link
Author

msholly commented Oct 24, 2016

FountainJS/generator-fountain-webapp#150

After struggling for longer than I care to admit - found the fix for the issue in the parent generator for this Yo. You must downgrade the glob-parent dependency of glob-stream from 3.0.1 to 3.0.0.

This should be solved here I suppose, but the parent generator team should release a fix since its broken on master.

@ghost
Copy link

ghost commented Oct 24, 2016

Interesting. I was seeing a problem similar to this when doing a gulp build on a windows server. There was a src folder in the dist folder containing the assets folder, which it wasn't doing before.
I wasn't too worried about it because we develop on macs and deploy to windows. Haven't seen this on my local dev machine, so we just changed the Windows build script to move the folders to where they should be.
Looks like it could be related to this.

@Swiip
Copy link
Member

Swiip commented Nov 5, 2016

I see in your yo-rc that you're using a 0.6 version which is very old, wan you re-test with 1.0.0-rc1?

@nish-nair
Copy link

nish-nair commented Nov 10, 2016

I have the same issue... to reproduce this, create a project using ng1-webpack-es6-sass-fountain-landing-page . Then run the command "npm run build" . Checkout the dist folder. There is an src folder in the dist folder which breaks the relative paths. because of this unwanted src folder, techs.json file cannot be loaded and throws a 404 error.
dist

@msholly
Copy link
Author

msholly commented Nov 11, 2016

@Swiip Since the bug was fixed by an older glob-parent version, I didn't test with your release candidate. I might have time tomorrow to do so.

Just in case someone else stumbles on this issue, here's the fix again:
FountainJS/generator-fountain-webapp#150

@Chklang
Copy link

Chklang commented Dec 14, 2016

This problem is resolved? I've created a project today and i've this problem : I've a folder dist/src/app/techs/techs.json

@micaelmbagira
Copy link
Member

@Chklang This is the way it should be

@Chklang
Copy link

Chklang commented Dec 14, 2016

So why js try to load /app/techs/techs.json and not /src/app/techs/techs.json? I've a 404 in dist mode

@micaelmbagira
Copy link
Member

This is a different issue, can you describe your problem and join your .yo-rc.json in a new issue ?

@Chklang
Copy link

Chklang commented Dec 14, 2016

Ok thanks :)

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

No branches or pull requests

5 participants