question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Defining useful additionalTasks is extremely confusing

See original GitHub issue

The additionalTasks documentation doesn’t actually define any useful real-world tasks, such as simply copying files from one directory to another. I tried adding a task that does this to my initialize function, and then running it as part of my prebuild step:

  additionalTasks: {
    initialize(gulp, PATH_CONFIG, TASK_CONFIG) {
      gulp.task('copy-package-json', () => {
        return gulp.src('./package.json')
          .pipe(gulp.dest('./public/'));
      });
    },
    development: {
      prebuild: ['copy-package-json'],
      postbuild: [],
    },
    production: {
      prebuild: [],
      postbuild: [],
    }
  }

The copy-package-json task executes when I run blendid but it doesn’t seem to copy the package.json file in the root directory of my project into the public directory. I thought perhaps this might be because my public directory is being wiped after the prebuild tasks execute, so I moved the task to postbuild, but then the task doesn’t seem to get run at all (in fact, blendid only runs the default and clean tasks when I do this, whereas it runs a bunch of tasks when I put copy-package-json in prebuild).

I recommend modifying the documentation so that at least one useful task is defined, so that readers have a better mental model for how to leverage additionalTasks for their needs.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dillonbaileycommented, Oct 1, 2018

@cbje-tokyo couple of options I can think of.

  1. One of the best things to do is to run a test with the task outside of Blendid. So run a blendid build and then set up a completely separate gulp task for your sitemap and run it against the directory to see if it works. This can rule out any issues with the sitemap extension itself.
  2. Share your project repo with me and I’ll take a look mate.

Cheers

1reaction
dillonbaileycommented, Sep 22, 2017

@toolness I set this GIST up with a useful(ish) additional task that copies a .liquid extended version of app.css over to assets for Shopify.

https://gist.github.com/dillonbailey/c06b1ee88ab1432435515c65840daf74

Read more comments on GitHub >

github_iconTop Results From Across the Web

Team Roles and Responsibilities: How to Effectively Define ...
Clearly defining team roles and responsibilities encourages you and your team to work towards goals much more efficiently.
Read more >
Roles and Responsibilities, Why Defining Them Is Important
Defining roles and responsibilities doesn't just help you find the right person for the job. It also improves employee experience and supports the...
Read more >
Using the Stages of Team Development | MIT Human Resources
Team Tasks. The principal work for the team during the Forming stage is to create a team with clear structure, goals, direction and...
Read more >
Understanding Difficulties and Resulting Confusion in Learning
In other words, confusion can be defined as an affective response that occurs in relation to how people come to know or understand...
Read more >
Why Feedback Rarely Does What It's Meant To
For December, we're sharing a 2019 article by Marcus Buckingham and Ashley Goodall that explains why certain forms of managerial feedback backfire—and offers ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found